perm filename POX.REM[UP,DOC]17 blob sn#587000 filedate 1981-05-14 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00034 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00005 00002
C00006 00003	                    Prototype Overlay Xerographics
C00015 00004	                                               2
C00022 00005	                                               3
C00030 00006	                                               4
C00038 00007	                                               5
C00046 00008	                                               6
C00054 00009	                                               7
C00062 00010	                                               8
C00070 00011	                                               9
C00078 00012	                                               10
C00085 00013	                                               11
C00093 00014	                                               12
C00100 00015	                                               13
C00107 00016	                                               14
C00115 00017	                                               15
C00123 00018	                                               16
C00131 00019	                                               17
C00138 00020	                                               18
C00146 00021	                                               19
C00155 00022	                                               20
C00162 00023	                                               21
C00168 00024	                                               22
C00176 00025	                                               23
C00184 00026	                                               24
C00191 00027	                                               25
C00199 00028	                                               26
C00207 00029	                                               27
C00216 00030	                                               28
C00225 00031	                                               29
C00240 00032	                                               30
C00245 00033	                                               31
C00250 00034	             PROTOTYPE OVERLAY XEROGRAPHICS -- WRITEUP
C00255 ENDMK
C⊗;

/FONT#0=NGR30/FONT#2=BDI25/FONT#3=NGR25/FONT#4=POXNGB[CSP,DOC]/FONT#5=POXNGR[CSP,DOC]/FONT#6=XMAS25/FONT#15=FIX25/FONT#12=POXBRK[CSP,DOC]/FONT#1=CLAR30/FONT#9=GRK30/FONT#14=GRKL50/FONT#7=POXBRK[CSP,DOC]/TMAR=200/PMAR=1998/BMAR=2
                    Prototype Overlay Xerographics
                     (name suggested by R.W.Gosper)
           By Robert Elton Maas, with revisions by Ralph E. Gorin and R.E.M.
                (POX writeup, last edited 1981 MAY 13  15:56)
   POX is a program for making documents that take advantage of the special features available on
the Xerox Graphics Printer (XGP). The special features that both POX and PUB provide are mainly font
switching, text justification and automatic "every page" actions such as page numbering. POX also
provides vectors, positioning of text etc. to an accuracy of 1/200 inch, composition of text etc. into
"overlays" which can be copied and processed without losing the relative positions of the components
(somewhat like sets in SUDS, the Helliwell drawing program). POX does not yet provide text responses
or footnotes. It is possible to set up cross-references or indexes/contents by means of macros,
providing that there are no forward references (i.e., everything is defined before it is used -- POX is
one-pass only). Neither POX nor PUB can yet be used interactively like GEOMED and SUDS, but it is
possible to use XGPSYN to view a document on the video synthesizer before making hardcopy on the
XGP.
   When both POX and PUB provide the desired features, i.e., none of the features that only one of
them has are needed, POX is usually preferred because of its greater speed. For example, a
benchmark text consisting of 10k of fully-justified text took 42.5 seconds of runtime using PUB, 4.5
seconds using POX without the simulator, and 10.9 seconds using POX with the simulator (see below for
explanation of the simulator).
   POX has at least one intractable bug -- this bug and some others recently fixed are listed in a
later section of this writeup -- references to these bugs are made from various places in this writeup,
in the format "see bug#n" where n is the number of the bug in that list. Users should report any bugs
they find that are not in that list, or which are listed as "fixed". Errors in this writeup should also be
reported before too many unwary users see them and expect POX to do things it can't do.
   POX takes a file as input and produces an output file that is suitable for spooling with the XGP
spooler (XSPOOL command). The input file contains instructions to POX and the text of the document.
POX takes character sequences as commands. Each command sequence is preceded by a character,
called the Brick Character. The first character in the file (ignoring TV directories and SOS line
numbers) is taken by POX as the escape character (See note 1). Thus, the user gets to specify the
escape character. The escape character can be arbitrary, but reason dictates that it should be some
character that appears infrequently (or not at all) in the text of the document. The most popular
choices for the escape character are \ _ and $. In the remainder of this document, the symbol 1
(pronounced "brick" -- you won't find it on your keyboard -- it's ASCII 061 in font
POXBRK.FNT[CSP,DOC] if you really want to know how I generated it in this writeup) represents your
current Escape Character, whatever it may be at the moment; however, in some examples below the
actual escape character will be shown rather than the brick symbol.
   I haven't really decided what to call these commands, so until I make a decision you may find that
at some places in this writeup they are called "escape commands", at other places "brick commands" or
"POX commands". The commands the XGP understands, beginning with an ASCII 177 which is rubout,
have entirely different syntax even for commands that perform almost the same function as a brick
command. These are referred to as "XGP escape sequences" or "rubout-style commands" to distinguish
them from brick commmands. These XGP escape sequences are normally present only in the output
from POX and PUB, except when POX is used as post-processor for some other program, such as
XLITER. For this and similar use, POX can accept certain system XGP escape sequences at some places
in the input file. What POX does is to convert these escape sequences into the equivalent brick command upon input, then to
process the brick command in the usual way. Thus the XLITER program can transliterate phonemes into cyrillic characters with
rubout-style font selects (to allow direct listing on the XGP if desired), and POX can treat the cyrillic as text, treat the font-selects
generated in the process of transliteration as 1F commands, and process other brick commands that were in the original text file (that
were passed-as-is by XLITER).
   To run POX, use the system command R POX (or RU POX[1,REM] if you want to use the latest
experimental version of POX if one exists). POX wants to see a command of the form: <OUTPUT
FILE>←<INPUT FILE>. If the <OUTPUT FILE> term is omitted (the arrow is then optional) then the output file
will have the same name as the input file, and ".XGP" extension. If only the extension of the output file
is omitted, ".XGP" will be used. If the extension of the input file is omitted and the period is also
omitted, ".POX" is assumed, and if that file isn't found then null extension is tried. If the extension is
omitted but the period is retained, only the null extension is tried. -- Alternately, instead of doing R
                                               1
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               2
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
POX, the system command POX may be followed by the <OUTPUT FILE>←<INPUT FILE> syntax all on one line.
-- Later if you haven't logged out and have the same alias, you can make POX use the same command,
without retyping it, by starting POX at the RPG starting address. For example, you can say "GET
SYS:POX" then say "S +1", or from E you can give the extend-mode command "RU POX[1,3]".
   If all is well with the input file, POX will run and produce an output file suitable for XSPOOLing.
If you are at a local display, POX will load the appropriate XSPOOL command into your line editor, so all
you have to do is type return to spool the file.
                       Sample POX input file
             (I assume you will have your files in E/TV format)
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002\|\\M0FIX25\M1NGR25\ This is a comment, after the brick-semicolon
C00004 ENDMK
C⊗;
                   <FORMFEED> i.e., page mark after directory page
\|\\M0FIX25;\M1NGR25;\; This is a comment, after the brick-semicolon
\; Font #0 is here in case title pages needed -- If we
\; don't explicitly specify it here, the system will invent a font#0.
\←L\+=100;\→L\; Move left margin in by 1/2 inch
\F1\CTITLE OF THIS DOCUMENT IS HERE
\J  This is a sample document, with justified text, and a centered
title.  It demonstrates to the person using POX for the first time,
just what is involved in a simple POX manuscript (borrowing terminology
from the PUB manual, in which a "manuscript" is the uncompiled form
you see here and a "document" is the compiled file all
ready to output to some device such as lineprinter or XGP).  If you
have any doubt what the output on the XGP would look like if
this document were actually compiled etc., I suggest you create
a text file with E or SOS and copy this page (after the formfeed
above, until the end-of-file location below), and actually
compile it and XSPOOL it.\.
                           <END OF FILE>
            THIS WRITEUP -- ORGANIZATION, MODES, NOTATION
   Each section in this writeup that describes brick-commands consists of the following: Summary
of what it's all used for, syntax of each command, the corresponding descriptions of what function each
command performs, examples of the use of the commands in this writeup itself with general references
as to where to look to see the effect generated, additional examples of use (input text followed
immediately by the effect generated in output).
   Some brick-commands will put the command scanner in a special mode until such time as an
appropriate "get out of this mode" character or brick-command is seen, at which time it will return to
its previous mode. Initially (after eating the directory page and the first character or two of the input
file) the command scanner is in "PASS-AS-IS" mode which means that carriage-return puts you at the
left margin, linefeed moves down to the next line, formfeed completes the page and cuts the paper,
brick causes a command to be expected, and all other characters are copied to the output file in the
currently-selected font. The effect is that text is aligned against the left margin unless you explicitly
do a column-select to cause it to be put elsewhere.
   The other modes you can get into are justify, centerify/rightify, copy text into a macro body,
evaluate and copy text into an overlay body, evaluate and copy text into a macro argument body,
ignore until linefeed, ignore until formfeed, ignore nonprinting characters until semicolon, and parse a
brick command. Before each command description is a list of which modes you can be in when the
command is scanned. The complete list is (U J CR o A) which refer to Unjustified (normal pass-as-is),
Justify, Center/Rightify, atomic text Overlay (1o command) and Argument to a macro or text to an
alternate output file, respectively (in the other modes, namely define the body of a macro, and parse
various commands, the brick character is treated as text rather than as initiating a brick-command).
                                               2
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               3
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
   Many places in this writeup it is necessary to show a string of text that looks as much as
possible like what the user would see when editing his source document. (E.g., in examples of how to
do things, and in the syntax descriptions where a particular character occurs as part of the command.)
For this purpose the font FIX25 is used, which has fixed-width characters that look very much like
those on local keyboards and displays and on our line-printer. Here is the complete 7-bit
Stanford-ASCII character set in this font:
<\0\>↓αβ∧¬επ λ<\11\><\12\>
<\14\><\15\>∞∂ ⊂⊃∩∪∀∃⊗↔ _→~≠≤≥≡∨  !"#$%&' ()*+,-./ 01234567 89:;<=>? 
@ABCDEFG HIJKLMNO PQRSTUVW XYZ[\]↑← `abcdefg hijklmno pqrstuvw xyz{|
<\UE\175>
}<\177\>
The following characters, however, don't look the same on our various devices, and usually represent
special functions rather than normal text, and hence will be represented in a special way in this
writeup:
OCTALFIX25IN THIS WRITEUPCOMMENTS
000<\0\>             null, ignored if occurs in source document
011<\11\><TB>    (horizontal) tab
012<\12\><LF>    line (feed)
013
     <VT>    vertical-tab
014<\14\><FF>    form (feed)
015<\15\><CR>    (carriage) return, always followed by <LF>
040      <SP>    space (bar), usually shown as actual space
177<\177\>           rubout, doesn't occur in source-documents
   The following additional BNF-style syntactical notation will be used in this paper:
   <CH> -- any single ASCII character (representing data to be copied to output)
   <N> -- any one of these characters: 0 1 2 ... 9 A B ... F (representing a logical font
number in IBM hexadecimal notation)
   <FONT> -- any font file name, if extension and [p,p] are omitted, default .FNT[XGP,SYS] is
assumed
   <NAME> -- any alphanumeric string, usually required not to be the null string (an identifier, a
name of an overlay, a macro, etc.)
   <OPEN> -- any legal open-nesting character, such as ( [ { < ⊂, or any legal quoting character,
such as " ⊗ ↓ / ∂ |
   <CLOSE> -- the matching close-nesting character, such as ) ] } > ⊃, or the same quoting
character, such as " ⊗ ↓ / ∂ |
   <BODY> -- any string of text not containing the quoting character, or containing properly-nested
open and close nesting characters (note that all characters are treated as text except for the <\SU\>particular<\EU\2,3>
quoting character or nesting pair selected in a particular instance, and special characters like comma
etc. which have special syntactical meaning) -- see description in commands where used
   <FILNAM> -- any standard file name, such as SUDS.RPH[UP,DOC].
 BASIC COMMANDS --- FONT SELECTION, JUSTIFY, CENTERIFY/RIGHTIFY, IGNORE TEXT
   The purpose of these commands is to select the style and size of printing (for example, font
BDI25 is BODONI-ITALIC, 25/200 inches high), to enter and exit justify mode (in which the text is
massaged so that each line is as full of text as will fit and extra partial-spaces are inserted between
words to make the margins line up exactly), to enter and exit rightify mode (in which text is aligned
with the right-margin but not modified in any other way), to enter and exit centerify mode (like
pass-as-is and rightify except each line is centered), and to ignore portions of the input text that you
do not want processed.
                         FONT SELECTION
1M<N><FONT>;(U) -- causes the font to be loaded into pox (and later into the system XGP
          service), and selects it now -- see note 5 and bug 2 -- this is the command that
          sets up the correspondence between fonts and the numbers you will use later to
          select them -- type to the system HELP FONT to find out about fonts that are
          available and how to peruse them -- always define one of your fonts with <N>=0,
          otherwise the system (which always insists on having font#0 around even if it
          has to make it up) will waste your time by loading one more font than you are
          actually using.
1F<N>(U J CR o) -- selects a font which has already been loaded -- all text after this
          command before the next 1F or 1M will be in font#<N>.
1f<N>(U J CR) -- selects a font for just one character, then back to old font. WARNING
                                               3
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               4
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
          -- Do not place the brick character immediately after this command because
          currently POX will quote the brick character in the temporary font rather than
          escaping and quoting the first character of generated text in the temporary font
          -- because this is regarded as a bug it might be changed someday -- currently it
          generates a warning message.
(See also push and pop font commands in the section on REGISTER COMMANDS.)
                           IGNORE TEXT
1
 (vert. tab)(U J CR o A) -- without changing mode, and without allowing EVERYPAGE to be
          called here, ignore all input text up to and including the next linefeed, thus
          concatenation of input lines may be done providing that the line-break is not
          inside some command syntax -- if you do this at the beginning of a line it is as if
          the whole line weren't there, thus comment lines may be inserted anywhere in
          the source file except in the middle of macro-body-definitions and in the middle
          of the syntax of brick-commands -- this command is especially useful inside
          justify or centerify/rightify mode to create a very long word or a complicated
          formula or a long sequence of arithmetic operations without leaving the mode. It
          is also useful in PASS-AS-IS to avoid calling EVERYPAGE just then, and in macros
          that are likely to be called from almost anywhere.
1N      (U J CR o A) -- same as 1
 for people who don't like vertical tabs in their text
          files. (They print out as <LF><LF><LF><LF> on TTY's, dial-up lines and the LPT, as
          "
" on local DPY's and the XGP, as <erase-to-end-of-screen> on some Beehive
          terminals, and who-knows-what on other display terminals on the Arpanet.)
1, (comma)(U J CR o A) -- same as 1
 except it ignores through next form-feed (page mark)
          thereby concatenating two pages into one -- if you do this at the beginning of a
          page, it is as if the whole page weren't there.
1  (space)(U J CR o A) -- without changing mode, ignore all input text (only spaces and
          tabs allowed) up to and including the next semicolon. This is useful for indenting
          input-text without generating spaces or tabs in the output. (Proposed additional
          feature (not yet implemented, as of 1976.NOV.26), if spaces and tabs are
          terminated by a printing character other than semicolon, that character will
          terminate this mode but will be unread before returning to previous mode.)
1     (tab)(U J CR o A) -- same as 1 (space).
                  ENTER SPECIAL-FORMATTING MODES (J CR)
1J      (U) -- begins full-justify mode, see table below for details on this mode and how
          to get out of it. -- Be aware that, because font selects count as text and
          therefore must be inside words, and because tabs cannot be in the middle of
          justified lines of text, the following input syntax is illegal and will generate the
          "illegal tab in justify" error message:
              1J1F1<TB>This is a paragraph of text...1.
          To avoid this problem, I suggest you do it this way instead:
              1F11J<TB>This is a paragraph of text...1.
1R      (U) -- begins single-line align-against-right-margin mode, see table below for
          details on this mode and how to get out of it.
1C      (U) -- begins single-line center-the-line mode, see table below for details on this
          mode and how to get out of it.
               EXIT SPECIAL-FORMATTING MODES, ETC. (SEE TABLE)
1. (period)
1; (semicolon)These two commands will get out of some modes back to pass-as-is mode, and do
          other things like ignoring text and suppressing <CR><LF> -- see table below for
          details of what each command does inside each of the modes.
<\V\49,290, .000,2,1370> <\VA\1>
<\V\49,1660, .000,120,2> <\VA\2>
<\V\49,290, .000,120,2> <\VA\3>
    1.                 1;           <CR><LF>  <TB> or <SP>
<\V\49,40, .000,2,1620> <\VA\3>
<\V\49,40, .000,90,2> <\VA\4>
Pass-as-is(not supported)do 1N, #4<CR><LF>, #4copy to output
Justifyfinish, <CR><LF>, do 1Nillegal(see #1)(see #2)
Centerify/Rightifyfinish, pass-as-isfinish, do 1N, pass-as-isfinish, <CR><LF>, pass-as-is(see #3)
<\V\49,40, .000,2,1620> <\VA\3>
finish -- Get out of special mode (don't emit <CR><LF> yet). To protect users who put text after 1. at
                                               4
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               5
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
the end of justified text, the 1N shown in the table above prints any flushed-text on your terminal as a
sort-of error message. When leaving centerify/rightify mode with the 1. command, the table shows no
1N command and no <CR><LF> inserted, so that any following text on the same input line will occur on
the same line of output. Similarily after using 1; to leave centerify/rightify mode, text on the <\SU\>next<\EU\2,2> line
of input will overprint on the <\SU\>same<\EU\2,2> line of output.
#1 -- A blank line (i.e., <CR><LF> immediately followed by <CR><LF>) causes the previous paragraph (if
any is in progress) to be finished, then a blank line is emitted. As many blank lines as appear in input
will appear in output. The next nonblank line begins a new paragraph. A single <CR><LF> in a
paragraph is merely a break between words.
#2 -- One or more tabs at the beginning of a line causes the previous paragraph (if any is in progress)
to be finished, then a new paragraph is started with its first line indented by the tab(s). Tab(s)
elsewhere are illegal. NOTE -- There is currently no way to indent by any amount other than a whole
number of tabs, nor is there any way to outdent by any amount at all.
#3 -- Tab(s) and/or space(s) at the beginning are ignored (in centerify this makes things look pretty, in
rightify it doesn't make any difference). Elsewhere tabs are illegal and spaces are treated as text.
(The feature of ignoring tabs and spaces at the end is currently under consideration so don't rely on
spaces being treated as text there.)
#4 -- After performing the indicated operation, if the EVERYPAGE feature has been requested for this
page (i.e., if VEREVE was TRUE at the end of the preceeding page) but not yet performed, then the
body of the macro EVERYPAGE is patched into the input stream at this point. This, of course, is likely
to clobber any registers (including the ac) that are used by the EVERYPAGE macro, unless you carefully
write your EVERYPAGE macro so that it saves and restores the ac and any other registers it uses.
                     REDEFINE THE BRICK CHARACTER
1|<CH>(U J CR o A) -- changes the brick character to <CH> -- I don't guarantee parsing
          will mesh with this in a reasonable way if you do this deep inside something
          complicated like justify, surrounded nearby by things that depend on the escape
          character being what you'd expect -- note that if you do 1|| you can't later
          change back because then as long as "|" is the escape character, "||" will be
          parsed as "11" rather than as "1|..." (see the 11 and 1"<CH> commands
          described later in this manual) unless, of course, you have disabled the 11
          command by means of 1⊂'1000001; or equivalent.
                     Examples of basic commands
   In this writeup I loaded the following fonts ($ is the escape character):
$M0NGR30;$M1NGR30;$M2BDI25;$M3NGR25;$M4POXNGB[CSP,DOC];$M5POXNGR[CSP,DOC];$M6XMAS25;
$MFFIX25;$MCPOXBRK.FNT[CSP,DOC];
(Note that NGR30 is not really loaded twice because when POX sees the $M1... command it notices that
NGR30 is already loaded as font#0 and POX then merely maps user font number 1 to system font
number 0 by means of the font mapping table in POX.)
   Later in this writeup, in a required-source file, the following load-font commands appear:
\M0FIX25;\M1NGB25[1,REM];\M2POXNGR[CSP,DOC];\M3BDI25;
\M9GRK30;\MEGRKL50;\MFPOXBRK.FNT[CSP,DOC];
Only the fonts not previously loaded are loaded now. The rest are merely mapped to their system font
numbers (assigned when first loaded) from their new user font numbers.
   This paragraph and all other justified text at normal margins was done by using 1J to enter and
1. to exit justify mode. (See the section on REGISTERS for how indented paragraphs of descriptions
after each command syntax was done by the 1j command.) The title on the first page is in centerify
mode, using 1C to enter and <CR><LF> to exit. (The titles on other pages are done by overlays, which
are also explained later in this writeup.)
   Here are some further examples of the above commands:
$F1This line $F2is in $F3several fonts.  $f1Temp $f1font $f1selects
This line is in several fonts.  Temp font selects
$F5$CThis line has antidisestablishmentarianismfoogarplylongwordthatis$N
                                               5
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               6
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
allinthesinglewordininthemiddleofthislineofcenteredtext as you see.
 This line has antidisestablishmentarianismfoogarplylongwordthatisallinthesinglewordininthemiddleofthislineofcenteredtext as you see.
$F3Hello there.$RWell, hello to you too$;
$C(Middle on same line)
Hello there.                          Well, hello to you too(Middle on same line)
$F3Left part $f1$CThis didn't get centered, see next example for fix
Left part $CThis didn't get centered, see next example for fix
$F3Left part $C$f1This got centered ok.
Left part       This got centered ok.
$F3For the same reason $f1$'14; doesn't do what you would want.
For the same reason $'14; doesn't do what you would want.
$F3But in this case some commands discussed later, $#$F1$'14;$G, do the trick.
But in this case some commands discussed later, <\14\>, do the trick.
                          SIMULATOR
   The "linefeed simulator" is a post-processor for all text emitted by the ordinary mode scanners
(U J or CR). To enable the linefeed simulator, use the 1⊂'4; command (see the section on enabling
special features).
   The original function of the simulator was to simulate the the way XGPSER (the part of the
system that services the XGP, in particular "XGP character mode" as described in the UUO manual)
would handle linefeeds emitted by POX, i.e., the simulator replaces each linefeed by an explicit
vertical-position-select that is equivalent to what XGPSER would have done if the linefeed had been
emitted directly into the output file. That makes it possible for POX to sort vectors and text into
correct sequence according to vertical position on the page before outputting them (XGP character
mode requires this), to know when bottom of page is reached and a new page is started (so that POX
can keep track of page numbers correctly, or warn the user if a page becomes full unexpectedly), and
so that uniform baseline spacing can be obtained regardless of varying sizes of superscripts and
subscripts. Later the simulator was enhanced to optimize font-selects, column-adjusts, and
baseline-adjusts, i.e., to eliminate all redundant operations, and to implement giant-baseline-offset, i.e.,
when a 1↑ or 1↓ or 1→, command is given with an argument out of the range of -100 to +77 (octal)
the baseline-specification is expanded into enough relative-baseline-offsets to accomplish the desired
effect, and (1977 Jan) to support overlays-qua-characters via the 1H command.
   Many of the commands below require the simulator if they are to work in full generality or at all.
                           REGISTERS
   There are 2<\BA\13>7<\BA\0>=128 registers which can hold any 36-bit integer (PDP-10 two's complement
format), such as the horizontal coordinate of some column on the page. (Note -- all locations on the
XGP, whether relative or absolute, are measured in XGP pixels which are about 5 mils, i.e. 1/200 inch)
The idea is to allow specification of multi-column tables and superscripts-above-subscripts in an easy
and flexible way, including automatic allocation of such things as "1/5 of a page" by simple division,
and to perform any other integer arithmetic or logic that might be useful during compilations of a
document. Each register is specified by an ASCII character. (Note -- in general, POX distinguishes
between upper- and lower-case characters -- for example, "k" and "K" do not refer to the same
register.) One of the non-alphanumeric registers (currently register ∀) is called the "accumulator" and
is the intermediate storage for most sequences of arithmetic calculation. Other special registers are
listed below, as well as characters that don't specify registers at all. (Warning -- non-alphanumeric
register names are liable to be changed to special arguments like "." and "," without much warning.
Therefore, please use only alphanumeric register names in files that you will be unwilling to maintain.)
Meaning of argument(s) to the commands:
<CH>  If not mentioned below, contents of register corresponding to that character.
. (period)   Current column location (increases as you move to the right) is stored in the
          right half of this register. Every time a character is written, this register is
                                               6
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               7
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
          updated to account for the space used up by the character, and if you write in
          this register, a column select will be generated in your output file to really put
          you there. (U) In pass-as-is mode, this column location is relative to the left
          edge of the paper and should be in the range of 50 to 1650 (decimal) usually.
          The left half of this register is zero in this case. (J) In justify mode, it is relative
          to the beginning of the current word of text (delimited by <SP> or <TB> or
          <CR><LF> except that <SP> does not delimit if it is not on the baseline). A
          relocation identifier is in the left half of the register to allow checking for illegal
          column selects. (CR) In centerify/rightify mode, it is relative to the beginning of
          the centered/rightified text with a password in the left half as if the text were
          one big word. (o) In define atomic text overlay mode, the right half is the
          location relative to the basepoint of the overlay, usually the left edge of the
          overlay. -- In arguments to macros, it is not implemented although you are not
          prevented from totally screwing yourself by the attempt to store in this register,
          or getting worthless undocumented data by reading from this register.
, (comma)    This register works somewhat like period, current relative position of text above
          baseline (if negative, below baseline) -- thus 1←q1→, replaces 1↑q and 1↓q' as
          well as 1∩ and 1∪. (U J CR) See the note after the 1↑ and 1↓ commands, for
          legal range of value stored in register ,.
; (semicolon)Like "." or "," -- absolute position (below top of page) of the last scan line of the
          last text line previously printed, or zero if this is explicitly the first thing on a
          page. Note that if the current line won't fit on a page and will get moved to the
          next page automatically, the next-page decision won't have been made until after
          processing of this line is done, so that register ; will still indicate the location (on
          the previous page) of the previous line, instead of zero. (Register ; only contains
          this information if this feature is enabled. See note 4 and the 1⊂ command.)
L        Left margin is stored in this register (<CR> causes column select here -- see also
          1J 1C 1R 1O 1W).
R        Right margin (for J and CR modes, and for warning you if you try to write past it
          in pass-as-is mode) is stored in this register.
(Note, top and bottom margins are handled differently; see the 1T, 1t, 1B, and 1b commands.)
'<SIGNED OR UNSIGNED OCTAL NUMBER>;
          Instead of reading a number from a register, these octal digits are assembled into
          a constant and that constant acts as an immediate operand (READONLY).
=<SIGNED OR UNSIGNED DECIMAL NUMBER>;Same as above except decimal conversion (READONLY).
w<CH>Width of character <CH> in current font (READONLY).
H        Total height of current font (READONLY) (if enabled, see the 1⊂ command).
h        Height above baseline of current font (READONLY) (if enabled, see the 1⊂
          command).
   The arguments marked "(READONLY)" above are forbidden in certain commands because the
command expects to have a genuine register to store data into. This restriction will be indicated by
"READONLY operands not allowed" in the command descriptions.
   Throughout the remainder of this writeup, command-arguments that are parsed in the above way
will be denoted by various alphabetic characters in a special font, to distinguish them from characters
that you are supposed to actually type (which are in a keyboard-style font as described earlier), and
BNF-style syntactical entities (which are in yet another font as also shown earlier). Here are what the
alphabetics look like in the argument font:
abcdefghijklmnopqrstuvwxyz
The commands that use the types of arguments described above:
                 LOAD/STORE/ARITHMETIC/LOGIC OPERATIONS
1←q  (U J CR o A) -- load ac from q.
1→q  (U J CR o A) -- store contents of ac into q, READONLY operands not
        allowed. WARNING -- Do not store in registers "." "," or ";" except where
        legal. POX will get confused if you do. See argument description above.
1+q  1-q
1*q  1/q(U J CR o A) -- usual arithmetic -- ac plus/minus/times/dividedby q,
                                               7
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               8
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
        result in ac.
1%q  (U J CR o A) -- "modulo" -- ac divided by q, remainder in ac. If the ac is
        nonnegative and q is positive, this corresponds to reducing the ac modulo
        q (number theory), otherwise the result is nonstandard mathematically,
        and indeed machine-dependent.
1¬q  1\q(U J CR o A) -- reverse arithmetic -- q minus/dividedby ac, result in ac.
    [Note -- since -1 is stored in the PDP-10 as all-ones, the POX command 1¬'-1; will logically complement the ac.]
1∧q  1∨q(U J CR o A) -- usual logical operations -- ac and/or q, result in ac.
1Lq  (U J CR o A) -- logical shift of ac left by q bits (if q<0 then shift right),
        result in ac.
1~q  (U J CR o A) -- maximum of ac and q, result in ac.
1_q  (U J CR o A) -- minimum of ac and q, result in ac.
                   SUBSCRIPT/SUPERSCRIPT COMMANDS
1↑q  (U J CR o) -- move text up q with respect to the baseline.
1↓q  (U J CR o) -- move text down q with respect to the baseline.
   With the simulator on there is no limit imposed by POX or XGPSER as to how large (positive or
negative) the baseline offset can be, except that each line of text must fit entirely on a page, and
things that are too complicated won't work, especially if the system is loaded. Without the simulator,
POX makes sure the XGPSER range of -100 to +77 (octal) isn't exceeded. This note applies to the
value stored in register , as well as the argument to the 1↑ command and the negative of the
argument to the 1↓ command.
1∩    (U J CR o) -- up to default superscript location (half the total height of
        the current font), easier than storing a positive constant in register "," or
        setting up a positive constant in some register q and then using 1↑q.
1∪    (U J CR o) -- down to default subscript location (half the total height of
        the current font), easier than storing a negative number in register "," or
        setting up a positive constant in some register q and then using 1↓q.
1⊗    (U J CR o) -- back to normal baseline from superscript or subscript; don't
        forget to do this! -- easier than 1↑=0; or 1↓=0; or 1←=0;1→, .
                      UNDERLINE OR FRACTION BAR
   Note, the position of an underline (including all scan-lines of the 1Ulatr command) is restricted
to a range of -100 to +77 (octal). The user who wants fraction bars etc. outside of that range has at
present only one option: use the macros of H. P. Moravec which simulate underlines by patching
together the appropriate number of graphics font characters end to end. At some future time it is
conceivable that POX could convert underlines into vectors, placed appropriately on the page to have
the desired effect. (This proposed feature would be yet another miracle of the "simulator", not
available otherwise.)
1Ulatr(U J CR o) -- underline from column l to column r, on scan line a
        relative to the baseline (a>0 moves the underline down), with line
        thickness t (extending downward from scan line a if t>1). See the
        example at the end of these commands. NOTE -- This command is
        inefficient (when t>1) because XGPSER doesn't support
        more-than-one-scanline underscores and hence POX must break up this
        command into one XGP underscore per scan line, with column-selects
        between each.
1{    (U J CR o) -- start underline, see UUO manual under XGP service.
1}at(U J CR o) -- in conjunction with 1{, end underline, on scan line a with
        thickness t.
   Note: the 1{ and 1}at commands are no longer recommended, because in justify mode if a line
is broken in the middle of an underlined portion of text, POX hasn't yet seen the parameters to be used
and must guess what they are (currently POX assumes they will be =2;=2; but warns the user in case
he didn't expect the line to be broken and/or didn't want to use those parameters). To avoid this
problem, use the newer 1[at and 1] pair of commands.
1[at(U J CR o) -- start underline, specifying starting-scanline and thickness at
        the outset so that the underline can be broken across several lines of
        output automatically (especially useful in justify mode).
1]    (U J CR o) -- end underline using parameters specified in the preceeding
        1[at command.
                                               8
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               9
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
           ENTER SPECIAL-FORMATTING MODES WITH ALTERNATE MARGINS
1j 1r or 1c(U) -- same as 1J 1R or 1C (respectively) except they set up temporary
        margins from registers l and r, then restore L and R to their old values
        upon exit. [Note that a <CR> occurring inside one of these commands,
        such as when <CR> on input terminates 1r or 1c, will set the page
        printer at the l rather than L margin. Thus, although only the r register
        needs to be loaded for the rightify per-se, the l register must be loaded
        to something reasonable for it to terminate with <CR> correctly.]
                GENERATING AND QUOTING SPECIAL CHARACTERS
1'<OCTAL DIGITS>;  (U) -- accepts an octal value and transmits it preceded by a rubout.
        This is used for printing the characters that are hidden under octal values
        0,11,12,14,15 and 177. WARNING -- Octal values of 1 thru 4 will cause
        XGP-escape to occur, then the XGP service will eat one or more bytes of
        whatever happens to be next in the output file. The result is that if you
        have the simulator on, or for any other reason cannot predict what the
        next bytes generated will be, unpredictable things may occur. The only
        reason POX does not generate an error is because Ralph Gorin insists
        that old files that do such things as 1'3;↓↓ (instead of the preferable
        1←'201;1Y) will continue to work as they always did. (Note, the
        function of this command is modified by the 1⊂'1000; or 1⊂'2000;
        command.) In modes other than U, it is necessary to use 1A'<OCTAL
        DIGITS>; to get this effect, and because that command does the "right"
        thing in all cases instead of the weirdnesses discussed above for this
        command, it is preferable even in U mode.
1"<CH>(U [J*] [CR*] [o] A) -- quote the character <CH>. In modes (U J CR) this
        means placing a rubout in front <\SU\>only if necessary<\EU\2,2> to make the XGP print it
        in the current font instead of performing any special function.
        Special-function is also suppressed as far as the justification algorithm is
        concerned, thus a space character quoted by this command won't cause a
        word-break. If the current 1 character is quoted, it will go through as a
        character instead of causing a brick command to begin. Only rubout and
        null may not be quoted by this command. In mode (A) nothing special
        happens except that if <CH> is the current 1 character or a comma or one
        of the nesting characters being used, they are passed as characters
        instead of causing their usual special function to occur (begin brick
        command, break to next argument, change nesting depth, respectively). In
        modes J CR and o, this command is currently implemented only for the
        characters that do not require the '177 prefix.
11    (U J CR A) [no longer recommended, use 1"1 instead (see previous
        command)] -- quotes the escape character -- takes precedence over any
        other command that parses the same due to coincidence of characters,
        thereby making that other command unavailable -- Please use
        1⊂'1000001; which disables this crufty old undesirable and unneeded
        feature, and thus unhides the other command.
1Aq  (U [J*] A) -- the seven low-order bits of q are assembled into an ASCII
        character, and 1" is performed on that character. Note, although this
        command is not yet implemented inside justify or centerify/rightify
        modes, if you just want to generate a funny character you don't have on
        your terminal, such as curly brace, the following trick may be used: Call
        the EVAL macro (defined in the section on macros with arguments) with
        the 1A... command as argument, for example \!EVAL(\A'176;);, which
        is legal in all modes. Of course, this will not have the right effect if the
        funny character requires a rubout preceding it.
1Dq  (U J CR o A) -- converts q into a string of decimal digits representing its
        value, like CVS in SAIL.
1a    (U J CR o A) -- eats the next character and loads its ASCII value into the
        ac. This is useful for munching through a string that is the body of a
        macro or an argument to one. (The usual technique is to have a recursive
                                               9
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               10
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
        macro with argument X (say) that calls itself via \!foo(\a⊗X⊗);. This
        way, each time the recursive call is done the new invocation has the next
        character's value in the ac and the rest of the string as the argument X.
        A dummy character tacked on the end by a top-level macro can be used
        to terminate the recursion.)
                        STACK OPERATIONS
1P    (U J CR o A) -- push ac.
1p    (U J CR o A) -- pop ac.
1Qq  (U J CR o A) -- push register q.
1qq  (U J CR o A) -- pop to register q. -- READONLY operand not allowed.
1#    (U J CR o A) -- push the current font number (octal 0 to 17).
1G    (U J o) -- pop a number off the stack and use that number to do a
        font-select like 1F -- must be in the range octal 0 to 17 to work
        correctly -- not yet fully supported.
             TEXT-MODE VECTORS (SEE ALSO ATOMIC VECTOR OVERLAY)
1Vx<\BA\-18>1y<\BA\-18>1x<\BA\-18>2y<\BA\-18>2w
        (U) -- draw a vector of HORIZONTAL width w between (x<\BA\-13>1<\BA\0>,y<\BA\-13>1<\BA\0>) and
        (x<\BA\-13>2<\BA\0>,y<\BA\-13>2<\BA\0>) -- vectors on the XGP (at SU-AI) are actually tall skinny
        parallelograms which get increasingly bad-looking as they approach being
        horizontal -- POX does nothing to improve the looks of diagonal vectors,
        but exactly horizontal vectors (which wouldn't work at all normally) are
        replaced by vertical vectors that are very very wide and very very
        short). Coordinates are measured in usual XGP coordinates. x increases
        from left to right, with x=0 being the left edge. y increases from top to
        bottom, with y=0 being the top edge. Vectors no longer have to be
        presented to POX with MIN(y<\BA\-13>1<\BA\0>,y<\BA\-13>2<\BA\0>) in ascending sequence because POX
        now sorts them into correct sequence automatically, but because the
        system requires both text and vectors to be sorted correctly, you must
        usually enable the text linefeed simulator (see note 2) whenever you
        want ordinary text to appear below any vector or overlay on the same
        page. One final warning with vectors is not to attempt to do anything at
        the very top of the first page of output (the system needs time to get
        started loading buffers).
1vx<\BA\-18>1y<\BA\-18>1x<\BA\-18>2y<\BA\-18>2t
        (U) -- same as 1Vx<\BA\-18>1y<\BA\-18>1x<\BA\-18>2y<\BA\-18>2w except t is thickness perpendicular to
        the direction of the vector in all cases -- i.e., for non-horizontal vectors
        w=SQRT(t<\BA\13>2<\BA\0>((x<\BA\-13>1<\BA\0>-x<\BA\-13>2<\BA\0>)<\BA\13>2<\BA\0>+(y<\BA\-13>1<\BA\0>-y<\BA\-13>2<\BA\0>)<\BA\13>2<\BA\0>)/(y<\BA\-13>1<\BA\0>-y<\BA\-13>2<\BA\0>)<\BA\13>2<\BA\0>),  whereas  exactly
        horizontal vectors are fixed up by this command the same as by the 1V
        command -- note that vectors which are almost but not exactly horizontal
        still come out quite ugly and usually overshoot their specified bottom
        ends.
               CONTROLLING INTERLINE AND INTERWORD SPACING
1λ    (U) -- use the contents of the ac to set the interline spacing, that is, the
        minimum number of blank scan lines (1/200 inch) between the very
        bottom of each line of text (including subscripts) and the very top of the
        next line (including superscripts). This parameter has different effects
        depending on whether the simulator is enabled. With the simulator on, if
        this parameter is negative it allows overlapping, if zero it allows bumping,
        and if positive it forces a gap, i.e., it is completely logical. With the
        simulator off it doesn't take effect until after the next text line, and its
        interpretation depends on its sign: positive is the same as with the
        simulator on, zero or negative means system default whatever it is today
                                               10
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               11
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
        (recently it has had the value 4).
1ε    (U) -- use the contents of the ac to set the interbase spacing, i.e., the
        minimum number of scan lines that baselines are forced apart. When the
        simulator is on, this parameter together with the interline spacing
        determine how far apart lines will be (each line (after the first on the
        page) is placed as high up on the page as is possible without violating
        either constraint). When the simulator is off, this parameter is ignored
        and only the interline spacing has any effect. -- A logical consequence of
        the above is that if the interline spacing is very negative, then only the
        interbase spacing has any effect, and you get evenly spaced lines even if
        they overlap; whereas if interbase spacing is negative or close to zero
        and interline spacing is reasonable, then in most cases only interline
        spacing will be in control, and you will get lines with the same amount of
        space between each pair, even if differing amounts of subscripts etc.
        cause irregular spacing to occur.
1≤    (U) -- use the contents of the ac to set the maximum allowed gap
        between words when justifying. If narrow margins, combined with a long
        word that doesn't fit on a line and so must be shoved to the next line,
        causes the current line to have gaps between words that exceed this
        parameter, an error is generated to warn the user that the output may
        be ugly. The user may then change the wording or margins slightly to
        try to alleviate this condition. If the ac is currently non-positive, the
        check is disabled (default situation).
             RESET VERTICAL POSITION FOR TEXT (SEE ALSO OVERLAYS)
1Yq  (U) -- set absolute Y position for top scan line of this text line relative to
        top of page (if no text line is currently active, apply to the next text line).
        Increasing q moves down the page! Text after this line will be below it
        on the page unless POX or the XGPSER decides it is too close to the
        bottom of the page and inserts a page mark. Do not use this command
        inside your EVERYPAGE macro (use overlays for all printing from inside
        EVERYPAGE macro) -- WARNING: If q is very large it will probably make
        the XGP spooler go beserk.
1yq  (U) -- the simulator maintains two parameters that tell it where the
        baseline and the last-scanline were in the previously-emitted text line,
        which are used by the simulator to decide where the next text line will
        be placed. This command adds q to whatever is in these two parameters
        at the moment, thus forcing the next text line down by that amount (up if
        q is negative) or forcing it to the next page of output. In the case where
        the line is forced onto the next page, it will be placed exactly at the top
        margin regardless of the size of q, so this command is especially useful
        for placing a gap just before beginning a new section in a document. If a
        1Y command has been done and not yet acted upon, the effect of the 1y
        command is to add to the 1Y value instead of adding to the two
        parameters.
1Bq  (U J CR o A) -- set bottom margin in POX to be q (relative to top of page,
        in 1/200 inch units). This command only has effect with the simulator on.
        If this is used to make larger than normal bodies of text, total page size
        must be increased beforehand with the 1eq command.
1bq  (U J CR o A) -- read the current bottom-margin and put it in q. --
        READONLY operand not allowed.
1Tq  (U J CR o A) -- set top margin in POX (effective only if simulator is on).
        This will always affect later pages, but will affect the current page only if
        no text has yet been emitted on it (technically if no complete line has yet
        been emitted on the page).
1tq  (U J CR o A) -- read current top margin and store it in q. -- READONLY
        operand not allowed.
1eq  (U J CR o A) -- change total page size to q scanlines. If this is used to
        make short pages, bottom margin must be moved up out of the way
        beforehand by the 1Bq command. If the value given is zero, pages will
                                               11
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               12
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
        be of varying length, with the bottom cut being just below the last text
        emitted on each page. (Thus you may want to put explicit blank lines at
        the bottom if you're doing this.) The bottom margin is still used for
        determining when to force going to a new page.
   IMPORTANT ADDENDUM:
        The spooler has no facility for dynamically changing page size. The last
        1e given in a POX source file affects the whole file by sending a switch
        to the spooler. Therefore, this command should be given exactly once at
        the start of the POX file, to avoid confusion if text were to be generated
        BELOW the edge of the page BEFORE POX was told of the correct page
        size, and not again. (The other commands, setting top and bottom margin,
        may be dynamic from page to page, if the simulator is on.)
1s<CH>(U J CR) -- store current x,,y (column in left half, scanline in right half)
        location of cursor (offset by any baseline adjust in effect) into register
        <CH> as soon as that information is available (in justify this isn't until the
        current line has been finished and has passed through the simulator). To
        be sure this information has been stored by the time you look at it, put
        zero in the register before you execute the command and test for
        nonzero before using the data.
1g<CH>(U J CR o A) -- get some parameter (as determined by <CH>) and load it
        into the accumulator. The following are currently implemented:
   1geBottom edge of paper (set by 1eq command)
   1gλInterline spacing (set by 1λ command)
   1gεInterbase spacing (set by 1ε command)
   1gMMode (U=1, J=2, CR=4, o=10, A=20 -- octal)
   1g⊂Uses old contents of ac (should be 0 or 1) to get special-features word
   1gmUses old ac contents as memory address to peek in core image
   1gpReturns 1 if EVERYPAGE macro not yet called on this page, 0 otherwise
1∃<CH>(U J CR o A) -- get date and time last-written for current input file and
        put it into register <CH> in the follwing format: Left half is in system date
        format, i.e. ((YEAR-1964)*12+(MONTH-1))*31+(DAY-1). Right half is
        minutes past midnight, i.e., HOUR*60+MINUTE. If this command is issued
        from the body of a macro (or argument) patched into input stream, the
        file inquired is the most recently-read file, which can be the file from
        which the macro was called, or some required source file that has been
        inserted since the time the macro was started.
                    MISC. COMMANDS NOT OFTEN USED
1uq  (U J CR o A) -- generates and executes a CALLI UUO using the right half
        of q, thus 1u'400012; will perform a CALLI 400012 -- the ac is used
        to supply data to some UUO's, and to return data to the program after
        some UUO'S -- if the ac field of the instruction is used in a special way
        other than merely pointing to data, then it isn't guaranteed to work the
        way you want -- the .SKIP. flag (a la SAIL) is returned in register u --
        see the UUO manual for details.
1S    (U) -- generates a sample of the currently-selected font -- type
        HELP FONT for other ways to get samples of fonts.
            Examples of commands using register arguments etc.
   In this writeup, the 1j command is used to generate the indented paragraph of description
alongside the syntax of each command. The sequence 1←q1→. is used sometimes to set column
position for single-line descriptions and to align text in some of the tabular presentations.
Example showing how to do a simple subscript:
1F3x1∪11⊗+x1∪21⊗+...+x1∪n1⊗+x1∪n+11⊗
x<\BA\-13>1<\BA\0>+x<\BA\-13>2<\BA\0>+...+x<\BA\-13>n<\BA\0>+x<\BA\-13>n+1<\BA\0>
Example of making five columns on a page, $ is the escape char:
$←R$-L$/'5;$→W$;register W contains width of a column
                                               12
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               13
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
$←L$→1$+W$→2$+W$→3$+W$→4$+W$→5$;registers 1,2,3,4,5 contain the column loc's
$←1$→.Hello$←2$→.This$←3$→.Is$←4$→.A$←5$→.Test.
$←1$→.These$←2$→.Columns$←3$→.Are$←4$→.Nicely$←5$→.Aligned.
Hello  This    Is        A           Test.
These  ColumnsAre    Nicely Aligned.
Example of hidden characters, $ is the escape char:
$FF$'0;$'11;$'12;$'14;$'15;$'177;
<\0\><\11\><\12\><\14\><\15\><\177\>
$F1This shows a crufty way to $←.$→1underline$U1=3;=2;. a word in a line of text.
This shows a crufty way to underline<\US\3,131><\US\4,131> a word in a line of text.
$F3$JThis paragraph is an example of how to insert something
like X$←.$→1$∩n$←.$→2$←1$→.$∪i$←.$~2$→.$⊗ in the middle of a paragraph of
justified text using the "." register that represents the current column
$←.$→1$∩loca$←.$→2$←1$→.$↓=05;posi$←.$~2$→.$⊗tion
relative to the beginning of the current word.$.
   This paragraph is an example of how to insert something like X<\BA\13>n<\BA\-13> i<\BA\0> in the middle of a paragraph of
justified text using the "." register that represents the current column<\BA\13> loca<\BA\-5> posi<\BA\0>tion relative to the
beginning of the current word.
<\V\56,1240,-.416,72,2> <\VA\1>
<\V\56,1240, .416,72,2> <\VA\2>
$←=2;$→V$←;$-=100;$→A$+=27;$→B$+=45;$→C$;
<\V\56,1200, .000,2,80> <\VA\3>
<\V\56,1200, 1.555,45,2> <\VA\4>
<\V\56,1280,-1.555,45,2> <\VA\5>
$←=1200;$→a$+=10;$→b$+=30;$→c$+=30;$→d$+=10;$→e$;
$VaBeBV$VaBdCV$VcAbCV$VcAdCV$VbCeBV$; draw 5-point star of constant width
<\V\57,1240,-.416,72,2> <\VA\3>
<\V\57,1240, .416,72,2> <\VA\2>
$←=2;$→V$←;$-=100;$→A$+=27;$→B$+=45;$→C$;
<\V\49,1200, .000,2,80> <\VA\3>
<\V\49,1200, 1.555,45,3> <\VA\4>
<\V\49,1280,-1.555,45,3> <\VA\5>
$←=1200;$→a$+=10;$→b$+=30;$→c$+=30;$→d$+=10;$→e$;
$vaBeBV$vaBdCV$vcAbCV$vcAdCV$vbCeBV$; draw 5-point star of constant thickness
$←;$-=20;$→:$v=1400;;=1300;:=20;$; sample of a very ugly vector
<\V\49,1300, 5.000,20,101> <\VA\3>
                           OVERLAYS
   An overlay is like a black-on-clear transparency. Overlays can be set up by feeding them text
or vectors (someday perhaps also video and III/DD buffers), and several overlays can be placed over
one another and glued together to make a compound overlay, which then can be further processed in
similar ways. Eventually, overlays are placed in the output file.
   All contents of an overlay are positioned relative to an arbitrary basepoint. When overlays are
placed on top of each other and glued, the x,y offset of the basepoint of each component is specified
relative to the basepoint of the operation as a whole, thus overlays can be made to fit side-by-side or
above-and-below or partially-overlapped or whatever. Defaults are available in some of the
operations.
   In typical applications, overlays act as data, and macros that call the overlay-manipulation
commands act as subroutines (see next section for macros).
1o<NAME><OPEN><CH><BODY><CLOSE>
         (U J CR o A) -- [Note that the pair of nesting characters ( and ) are not
         allowed in this particular syntax. The reason is that the syntax
         <OPEN><CH><BODY><CLOSE> will represent something like an atom, with "("
         and ")" reserved for generating s-expressions, if and when I implement
         a subset of LISP inside POX.] If <CH> is "V" then define an atomic vector
         overlay (syntax is same as the 1Vx<\BA\-18>1y<\BA\-18>1x<\BA\-18>2y<\BA\-18>2w command without the
         initial 1 character, effect (semantics) is the same except that (0,0) is at
         the relocatable basepoint rather than at the upper-left corner of the
         output page) else if <CH> is a period or a font number then define
         atomic text overlay with the current font or with font <CH> respectively
         (the basepoint is set at the intersection of the left edge of the first
                                               13
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               14
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
         character with the font baseline) else error -- If there is already an
         overlay by the same name, the old one may or may not be deleted, so
         beware.
1n<NAME>;(U J CR o A) -- load parameter n of overlay into ac, see the following
         table:
      n    namemeaning (all quantities are usually nonnegative)
      1    LLIMdistance from left edge to basepoint
      2    RLIMdistance from basepoint to right edge  (LLIM+1+RLIM = total width)
      3    TLIMdistance from top edge to basepoint
      4    BLIMdistance from basepoint to bottom edge  (TLIM+1+BLIM = total height)
      5    TLIM1distance from top nonblank scan line to basepoint (see bug 2)
      6    BLIM1distance from basepoint to bottom nonblank scan line (see bug 2)
      7    RMOVEsame as RLIM initially, used by 1H command
         Note that TLIM1 and BLIM1 are currently unsupported because they
         haven't yet been made to work correctly.
1:n<NAME>;(U J CR o A) -- clobber parameter n of overlay from contents of ac,
         thereby making it "lie" if this parameter is later queried by the 1n
         command (occasionally useful to interface with macros); only the right
         halfword is used, interpreted as a signed-halfword in 2's complement
         notation.
1&<NAME_OF_RESULT>←<NAME<\BA\-10>1<\BA\0>>,x<\BA\-10>1y<\BA\-10>1&<NAME<\BA\-10>2<\BA\0>>,x<\BA\-10>2y<\BA\-10>2&...&<NAME<\BA\-10>n<\BA\0>>,x<\BA\-10>ny<\BA\-10>n;
         (U J CR o A) -- combine overlays by laying them at various offsets and
         gluing them together to make a composite overlay -- for i=1,2,..,n the i<\BA\13>th<\BA\0>
         component overlay is shifted so that its base point is located at (x<\BA\-13>i<\BA\0>,y<\BA\-13>i<\BA\0>)
         relative to the logical basepoint of the resultant overlay (positive x is to
         the right, positive y is down) -- the first six parameters are computed
         according to the offsets and parameters of the components, what
         happens to RMOVE is currently unsupported -- if you leave out the
         comma and xy arguments from any component, it will place that
         component just to the right of what is already prepared, and use 0 for
         the y-offset.
1O<NAME>,xy
1W<NAME>,xy
1O<NAME>;(U) -- output overlay to XGP, with basepoint moved to absolute location
         (x,y) -- you can output an overlay randomly anywhere on the page, or
         you can replace the ",xy" by ";" (see syntax, at left of this
         paragraph) to get the Gosper-requested default for which no special
         claim is made, except to say that the overlay is placed "just below"
         where you were writing plain text previously -- Because text must be
         presented in ascending Y-sequence to the XGP, you must enable the
         simulator (see note 2) whenever you place ordinary text below any
         overlay on the same page. -- ADDENDA 1975.JUL-AUG -- At the
         insistence of Ralph Gorin, the default way these commands work is a
         complicated illogical mess that happened to be implemented for a few
         days in July. If you have the '200000 bit on, as I recommend for all
         new files, the following more reasonable thing happens: 1O always
         affects your page printer, and register ; if the simulator is on, and is
         supposed to be used for displays that occur in the middle of text, not
         page headers/footings. 1W never affects your page printer or register
         ; and is useful for headings/footings, especially from the EVERYPAGE
         macro feature. The following other differences exist: the 1W command
         will force the overlay to be on the same page, even if it is outside the
         normal page margins, whereas the 1O command will warn you if it is
         below the bottom of the page, or if VERPAG is on (see the special
         features section) it will be placed on the next page automatically.
1H<NAME>;(U J CR o) -- output overlay to XGP as if it were a large character, right
         "here" in context, including any baseline offset that may be in effect.
         No side-effects occur except moving the column counter to the right by
         the amount of parameter 7 (RMOVE) of the overlay -- note that left
         kern can be obtained by offsetting the entire overlay so that parameter
                                               14
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               15
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
         1 is nonzero, and right-kern can be obtained by modifying parameter 7
         to be different from parameter 2.
1∂<NEW_NAME>←<OLD_NAME>;
         (U J CR o A) -- rename overlay or macro -- if resultant name is the null
         string then delete rather than rename -- It is probably a good idea to
         delete any obsolete overlays or macros to save core -- The onlxPε{S#↔⊂h)↓↓α↓↓↓↓αβ7π+␈⊃βK↔∂≠?9β6{IβW≡K;≥β&C'Mβ≡{77πv!β;?:β'Mβ&yβS↔oβ?Kπ⊗K3eβ⊗+;π7(h)↓↓α↓↓↓↓αβO?7/##';:βO=β&CπQβO!β∂πrβ∃β&+7C?⊗K'3JβK↔∪.3';↔"aβS#.qβ∪↔f+S∃β&C∀4)α↓↓↓↓α↓↓βS.kC?K∂∪eβ∪.3';'&K?9β∞s⊃βK.sπ7∃π##∃βε+K7πv+;Qβ&+≠';O#'?9ε∪π∂-ε∨π'ph)↓↓α↓↓↓↓αβ←#↔rβ∪?;*q↓55¬##∃β⊗+;π7*βπ3∨␈∪'S#jβ∂WK⊗+;S3Jβ'Mβ∂→β≠?fc?←MRα∪=β∞c1βSF(4)↓α↓↓↓↓α↓β≠?fc?←'v91β≠O∪OQβ6{Iβ?6+K3πO→1βSF+9β'2βS#π"β≠π3g→βS#↔)1β≠␈⊃β7π∨∪?MiαAE%β∨#πKPhQ↓↓↓α↓↓↓↓εQβSF)βS?αβ?→βfKOQβ}1β∪↔6K;'SN{;M1εI;∃9εk?OQπ∪↔∂↔w#3e7&+≠';.!β'S.im↓!∩Iβ'→εKSL4R↓↓↓↓α↓↓↓βv7∃β/Wπ3~↓r>2#qβS#.qβ∂3}∪↔IεKSMβ⊗+SK'/3π1βv7∃β&y↓r:-9yβπv!βK↔'+K84R↓↓↓↓α↓↓↓β7∪?5β&C∃α∪zβ3??αaβ↔3≡)β'→εKSMβv7∃β/Wπ3~↓r:⊗;qβS#.qβ∪↔f+S∃βO!βπ;"β≠π3`h)↓↓α↓↓↓↓αβS#K␈+∨!β&y↓M1ε+3O∃ε#=β;␈##';:βπ;⊃ε3π31π##K?.;!βSz↓Mm↓C→%β7␈3∃β∪␈;9βSxh)↓↓α↓↓↓↓αβ;↔c"β?3∪/⊃β'S.iβ'9π##∃βfKOQmαAQ%β>yβS=β⊃9↓5jαS#W~β'QβO→βC?∨≠'3*βS#π h)↓↓α↓↓↓↓αβK↔;∞k';≥π##∃βfS↔O"β[↔K≡K?9β}1β¬β';'∂∃n#↔≠'v+⊃β?6+K3πJβ?Iβn∂K=π;'30hQ↓↓↓α↓↓↓↓π+;7π≡YβS#*β?3∪/⊃β[↔↔≠'?9rα∪?9?!βK↔gIβ?9π##'Mbβ'Qβ&+C↔;'→βS?zβ7W∂Bβ?84R↓↓↓↓α↓↓↓β&C∃βO'∪W∂S/∪∃β?2βS#∃π#π3/→β?→ε#↔≠'vKS'?w→1βπv!β'Mεc'/↔gIβS=ε≠#π;>)β'9π##∀4R↓↓↓↓α↓↓↓βv+πIβ7+SWK*β←'SF{WQβ>K;'v9∧4)α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓∧+cπ7εc↔Mβ}1βWO*β?→β␈3↔K3∂KL4)&z:V6[	7	.≥
JQ#∩"yuEβYI⊂Yk#π
&j!m↓β≡+QβWαβS#∃εsW7↔⊗S?HhQ∪>∩,rmEK
i∩⎇uβY⊂eA#YβO↔"βWAβ&C∃β∪.s?7'vS?Iε;⊃β
βWO↔7+1βK.;'OS/⊂4)⊃Zα:>R*↓55α&C∃βπf;?K'&C5βπ~βCK↔≡+;S↔"β#↔K*β?;3Jβ←?K←→β←#.qα:Vjβ'Mβ>K∪↔Iπ##π9∧"⊗84R!F:VkY⊂fa#∩:V5Z!.a⊂L	⊃mβ≡+QβWαβaβ?63O↔Qbβ∂?7π+S∃β≡Kk∃β}1β;Wn+KπS␈⊂4)∪|∩εJn3↓B¬Ak⊃nu⊃ZβO↔Qπ+Aβ¬ε3Kπ∂&K?9β⊗IβSF)β∂?↔∪↔∂Qεc↔;∨&Aβ≠?∩β;W7/∪πS?⊂h)⊃Ru*5m⊃[iMm⊂+↓⊂fe#~∩⊗9Z!-uUZ ge⊃Zβ∂?7π+S∃βJβ?≠≠≡+SL4R!F∩⊗sY⊂eE#∩∩⊗9Z ∃E⊃\	⊃=u∪Y⊂ga#Yβ∂?oβWS∃πAβ?≠7≠↔P4R!~~J~}:Vjbbe~$*93cJ2
εIc↓Am⊃Zβ7π/*β≠Kπ∨#'?9ε	β∂?oβ?O'&)β?[/∪3πdhQ↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓αk	.N
∩Q#	eb
εq↓yIrd∩εqAriSπ
Hh)⊃J5∩ε
m *I⊂fB!R~J→m⊂∃Z fe∩|2Jε
eBe⊃mε{WSC/!β?[/∪3πeπ∪'∨#&K≠'↔ h)rr5aQe1⊃Ua1αqAAAc⊃1IU∪q↓rr4
qExhQ↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓α↓↓↓↓β∪∧4)α↓α#↔⊗)∨Mβ
βWO↔7+1β#∞≠-βW≡K;≥β␈3↔K3∂KM9α∨+CC?≡)βg?*β←π;"βS=β6K;⊃β␈+Qβ#␈9β←'&)β¬β∨#K';:β?→β&+cQβO_4+'rβ¬βC∂∪S'∂.cπIβ6{;Q↓F{Iβ∂}k';∂#'?9ε{→β≠}sSM%rαg?Uε≠π9β∨∪↔πS*βπ9β␈3↔K3∂I1β7.OWK*β'SMπβπKπn+S↔K_h)!Ec⊃1M1"I1βSF+9β∪.c↔S∃εKQβKN;#Qβ∂;πeβ&yβK↔≡cπ'5π##∃β∨βπ∂∃π+O↔⊃ε∪eβSF)β?[/∪3πeπ##πQπK?Uβ>{9∨Qε∂SW∞c3eβ⊗(4+W≡K;≥β∂→βπ9ε{[↔Kfe84R↓↓↓↓α↓↓↓αl
∞J>~↓"↑&$B>VQ∧
J≡Vl*:RMJαε:⊃¬∩⊗FVM∩∃αN⎇*J∞∃∧2&2⊗_h)↓↓∧31βNsCWQπ#=βSF)αB>BβS↔c"βCK?≡+OO?∩βCπO≡+MβSG∪?W∨Bβ¬βC⊗)7CK}≠↔OO␈⊃β←#N≠!β'w≠↔KS~β7π∂⊗yβ?&K↔M0hSπK∨.k↔;S~βS=βn∂K?~aβπ;"βK↔G.+OS↔"βO?W⊗≠∃β≠Nc↔MβNqβS#*β7'∪&c∃β?2βS#∃εK;CW"βOSK.5βπ≡≠?K∪Ns≥βSzβS#∀hS≠?3f{←';:β∂?7n;∪MPh)D9drε6∃sb>B⊗sqr
>%Iyr∞dzN∃xhQ↓↓↓α↓↓↓↓αBUα)∧~Iβ=∧	%↓5jβ∪↔≠Ns∃β¬εkπ∂Kzβ≠?Iπ+O∃βfS↔Iαi5β;␈#∃βSFQβ'rβ;π7/→β?_hQ↓↓↓α↓↓↓↓εkπ∂K␈→1β+/≠Qβ3N[∃βπfk?OQε+[↔KO;#↔K*β↔3O*aβ3?>+Iβ∂∂≠∃β'~β;?Qπ##∃β≡7∃β∂_4)↓α↓↓↓↓α↓βWCε+Iβ∂∂≠∃1β&CWMβ6{=α≠}yβ~>zα~>=ε2?=β6z=α≠|yβπ;"α~?=εK∃β.K∨#PhQ↓↓↓α↓↓↓↓ε#'≠≠/∪↔;Qεsπ7↔~↓55β∞cO=1π##∃↓d∩>∩erβ'Mβv{Qβ↔63Wπ&+⊃β∪/∪';≥π##'LhQ↓↓↓α↓↓↓↓ε#↔≠'vKS'?rβC#π≡)1β%v)91β&C∃β↔≡≠πC∃ε≠#πK∞≠S↔Iε;⊃β∞sgS#Ns≥β↔g≠∃β7∂H4)↓α↓↓↓↓α↓β?∂∨+Iβ'rβS#∃ε∪?∪ebβ;?SFK;≥β∨β↔∂'∞aβ#ππβ↔;MεMβSF)β↔O≡C∃β≡CπKπ∨#↔IβO_4)↓α↓↓↓↓α↓β∂?εK↔⊃βNsS=β&C∃β7∞≠K=1ε+O∂πε)β?;gIβ?∂∨+KMβfS↔Iπ;#↔9π##∃βn∂K=εKL4)α↓↓↓↓  actually called, resulting in the escape character and everything else
         getting stuffed into the input stream.
1!<NAME>;(U J CR o A) -- call a macro, i.e., insert body from definition right here
         in input stream, hence occurrences of the escape character in the body
         will cause things to occur now (see note 1 also).
1?<NAME>;(U J CR o A) -- "conditional macro" -- same syntax as above but
         generate nothing unless accumulator is positive (see note 3).
1I<NAME>;(U J CR o A) -- "iterate macro", same as 1?<NAME>; except that after
         completing the first read-back of the body, if the accumulator is
         positive it goes back to the beginning and reads it again, etc. -- the
                                               15
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               16
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
         effect is the same as in SAIL executing "WHILE ac>0 DO <call macro>".
1@<FILNAM>;(U J CR o A) -- insert source file here, then return to current file.
1α<FILNAM>;(U) -- insert source file here but don't come back here -- the rest of
         this file, and any files that called it, are not processed.
1∀<FILNAM>;<LIST OF DESIRED MACRO NAMES>;
         (U J CR o A) -- scan source file that contains macro definitions (see next
         section on macros with arguments, as well as this section, for details on
         the macro definitions themselves). At present, the file must contain a
         TV/E directory to avoid a bug in POX. Nothing in the file is processed
         unless it simultaneously satisfies these conditions: (1) It begins with a
         brick character in column 1 of the file, i.e., immediately after a linefeed;
         (2) It has either a ∞ or 8 in column 2, i.e., it is a command to define a
         macro; (3) The name of the macro (in the 1∞ or 18 command being
         tested) is a member of <LIST OF DESIRED MACRO NAMES> that has not yet
         been used. In particular, 1| commands are not processed, so that the
         entire library must use the same brick character, and this brick
         character must be set up before issuing the 1∀ command. Also, 1⊂ etc.
         commands are not processed, so that all bits needed for correct loading
         of macros, namely VERREM='40, VERRHT='400 and VERESC='100000,
         must be in the proper state before issuing the 1∀ command. For
         documentation purposes, any library of POX macros should begin with a
         comment (or a 1⊂ 1⊃ command pair) that reminds users of the correct
         states of these special-feature flags. -- Example:
           1∀REMLIB.POX[1,REM];DATIME,PAGENUMS,SUB,SUP,PAGENUMS;
         This loads the second-occurring version of PAGENUMS on top of
         (replacing) the first, and loads only the first version of each of the
         other macros. It is probably preferable to use "fully-catalogued" names
         rather than have several different macros by the same, then after
         loading to rename each macro (using the 1∂ command) to a shorter
         name that will be used locally.
1β<FILNAM>;(U J CR o A) -- lookup file but don't read any of it. If the file does not
         exist then type the name of the file on the TTY and increment the
         contents of the ac. Do not in any case generate an error or otherwise
         affect the state of the text compilation in progress. Useful for checking
         all the required source files at the beginning of a long compilation to
         save time if several files to be called later are missing and need to be
         restored. A useful technique is to set the accumulator to zero, then
         perform one 1β command for each source file that will later be needed,
         then test the accumulator and if it is now positive generate a deliberate
         error to give the user time to put on the disk all the files that were
         found to be missing, before proceeding with the document compilation.
1m<OPEN><TEXT><CLOSE>
         (U J CR o A) -- send the text to the terminal, presumably to
         communicate with the user, such as to indicate progress with
         compilation or to list which physical pages of output correspond to
         which chapters of the document.
   In the above, <FILNAM> is a standard file name FILNAM.EXT[P,P] which must be either a non-POX
file with no occurrences of the brick character or a pox file that does not begin with a bare brick
character (i.e., it should begin with something like 1|1), <OPEN> and <CLOSE> are a matching pair of
parentheses such as () [] {} ⊂⊃ <>, in which case occurrences of these characters in the body
must be correctly matched, or else two identical quoting characters such as "" // ↓↓ ⊗⊗ || ∂∂, in
which case the quoting character is not allowed to occur in the body at all (the complete current list of
legal nesting and quoting characters may be found by examining the source for POX).
   (In the 1@ command, after the file name and before the ";", it has been proposed to allow
uncoupling flags, designated <UC> below. Their purpose will be to save various internal states before
beginning to input an inserted source file, then to restore those states before returning so that the
inserted file won't pass undesired side-effects back to the main program. In the absence of any <UC>
flags, any macro-definitions or font compilations etc. done in the inserted source file will stay in effect
after returning to the current file, a sometimes undesirable effect.)
                                               16
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               17
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                 Examples of macros without arguments
$∞SUPERSCRIPT[$F1$∩$F2]$∞NORMAL[$F1$⊗]$; $F1 sets font so $∩ uses correct default
$!NORMAL;Y = X$!SUPERSCRIPT;i+1$!NORMAL;-1
Y = X<\BA\16>i+1-1
$∞SOJGxFOO[$F2(FOO)$←N$-=1;$→N$?SOJGxFOO;]$; set up a count-down-to-zero loop
$; note that the above macro will recursively call itself N levels deep
$←=15;$→N$!SOJGxFOO;$; call the loop with N=15 to generate 15 copies of (FOO)
(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)
         MACROS WITH ARGUMENTS -- EVALUATED LIKE LISP EXPR'S
   Many of the commands described above are too elementary to be less than tedious in practice,
even with macros used to abbreviate long sequences of commands. Complicated things are almost
unbearable, for example to create a superscript above a subscript as in "x-sub-i-to-the-nth-power"
would require quite a mess of almost unreadable code, such as:
      1F11⊗x1←.1→01↑=15;1F2n1←.1→11←01→.1↓=12;i1←.1~11→.1⊗1F1
where you may have trouble locating the terms "x", "n" and "i" amidst all the overhead. Using macros
without arguments may result in some increase in readability. This can be done in at least two
reasonable ways, resulting in:
      1!txt;x1!savecol;1!sub;i1!swapcol;1!sup;n1!maxcol;
or  1∞main[x]1∞sub[i]1∞sup[n]1!sbp;
Macros with arguments make things easier and much more readable. After once defining the macro
sbp(main,sub,sup) (see the examples later in this section for details) we can generate
x-sub-i-to-the-nth-power by the simple:
      1!sbp(x,i,n);
The pseudo-language we thus build up out of macros-with-arguments partially obviates the necessity
of fixing the "bad" syntax that POX has.
                    DEFINE MACRO -- VERREM SYNTAX
         (THIS AND FOLLOWING SECTIONS WERE REWRITTEN 1975.NOV.27-DEC.05)
18<NAME>(<ARGNAMES>)<OPEN><BODY><CLOSE>
     (U J CR o A) -- define a macro with arguments (up to '30 arguments currently
     allowed). The VERREM special-feature bit must be on at the time this command is
     scanned. See details of syntax below.
     <ARGNAMES> -- Up to '30 alphanumeric strings separated by commas. (Note that the
     characters surrounding <ARGNAMES> must be parentheses.)
     <BODY> -- An arbitrary string of text to be copied verbatim into the "body" of the
     macro. This text will be spliced into the input stream later when the macro is called
     (see the 1! command), just like macros without arguments. The following exceptions
     to the "verbatim" copying exist:
     <OPEN> and <CLOSE> must be properly-nested if they appear at all inside the body.
     POX counts how many levels deep you are, and only terminates parsing when the
     depth reaches zero, i.e., when the <CLOSE> appears that matches the original <OPEN>.
     Of course, if you use a quoting pair to delimit the body, the quoting characters may
     not appear at all in the body.
     1 (i.e., whatever your brick character is at the time you define the macro) gets
     converted into a <BRICK> token if the VERESC special-feature bit is on, otherwise it
     gets copied verbatim too. When the <BRICK> token is seen later when expanding the
     macro, it gets converted to the 1 character, which will be a different character from
     the original if you have used 1|<CH> to redefine the brick character in the
     meantime. (Without the VERESC feature, it would be the same ASCII character as
     before, even if it were no longer the brick character.)
     ⊗$⊗ gets converted into the <BRICK> token regardless of the state of the VERESC
     flag.
     ⊗⊗ gets converted into a <\SU\>single<\EU\2,3> ⊗ character.
     ⊗<ARGNAME>⊗ (one of the argument-names you specified in the <ARGNAMES>) gets
     converted into the appropriate <ARGn> token. Later when the macro is called, this
                                               17
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               18
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
     token is replaced by the n<\BA\13>th<\BA\0> actual-argument string.
     ⊗@q⊗ (not supported, and likely to be purged or differently-implemented soon)
     performs the register-argument lookup and uses the value thus obtained (must be in
     the range 0 to '30) to generate the corresponding <ARGn> token.
     ⊗...⊗ -- anything else after a ⊗ character is illegal. An error will usually be
     generated before the second ⊗ is seen (if there is one).
                   CALLING MACROS -- LIKE LISP EXPR'S
1!<NAME><ARGBATCH><ARGBATCH>...<ARGBATCH>;
where each <ARGBATCH> is of the form <OPEN><ACTUAL ARGS><CLOSE> and each <ACTUAL ARGS> consists of
arguments separated by commas, as described below.
     (U J CR o A) -- call a macro with arguments. Each <ARGBATCH> unit may use a
     different <OPEN> <CLOSE> pair (when the <OPEN> is seen, POX looks it up in a table to
     determine which <CLOSE> to look for) selected from the legal nesting or quoting pairs.
     As many arguments as desired, separated by commas, may appear in a single <ACTUAL
     ARGS> item, and as many <ARGBATCH> units may appear altogether (as indicated by the
     "..." in the above syntax specification), provided that the total number of arguments
     does not exceed '30. The most common way of doing it, and the easiest, is to use
     ordinary parentheses, with all arguments in a single <ARGBATCH> unit, for example:
            1!FOO(First argument,Second argument,Third arg);
     However, if any argument contains or generates a comma, it is necessary to turn on
     the VE1LES special-feature bit (to prevent comma from delimiting arguments) and to
     enclose each argument in a separate set of nesting characters, such as:
        1!LESHACK(First argument with ",")(Second argument)(Third);
     Also, if parenthesis occur inside arguments, it is usually necessary to use some
     other nesting or quoting pair, for example:
         1!MESS<This contains (, [, ", and { inside an argument>;
     A detailed description of the algorithm that is used to scan the
     macro-with-arguments syntax, build up arguments, bind them to the <ARGn> table that
     is passed to the macro-body expander, and the algorithm the macro-body expander
     uses to splice the macro body and the arguments into the input stream, is given
     later. If you plan to do anything complicated with macros, you will need to read the
     algorithm-description and understand it in order to predict what happens when
     various special characters (<COMMA> <OPEN> <CLOSE> and 1) are generated inside the
     scanning-of-arguments process. Note that it is not legal to generate an ASCII '177
     or '0 character while preparing an argument, thus many commands (such as
     font-select) are illegal inside arguments. By quoting the characters that make up
     the command (see below), however, the evaluation of such commands may be
     postponed until after the expanded macro has been generated and patched into the
     input stream, at a time when such commands are legal. Be aware that other
     commands such as 1A have a slightly different effect depending on whether they
     are evaluated while scanning an argument or while generating output text later, and
     that commands that fetch contents of registers etc. will give different effects if that
     data changes after argument-scanning-binding time.
1?<NAME><OPEN><ACTUAL ARGS><CLOSE><OPEN><A.A.><CLOSE>...;
     (U J CR o A) -- conditionally call a macro with arguments. At the beginning of the
     scan, just after the "1?" has been seen, a flag is set according to whether the ac <\SU\>is<\EU\2,3>
     positive or not. Then all argument scanning etc. is performed just like in the "1!"
     command (indeed, the same piece of code is executed in POX). When the final
     semicolon is seen, the flag is tested to determine whether the input-stream patch
     will be done (if the ac <\SU\>was<\EU\2,3> positive) or the patch not done and the table of
     arguments flushed (if the ac <\SU\>was<\EU\2,3> zero or negative).
1I<NAME><OPEN><ACTUAL ARGS><CLOSE><OPEN><A.A.><CLOSE>...;
     (U J CR o A) -- iteratively call a macro with arguments. Similar to 1I<NAME>;
     command. Note that the arguments are only evaluated and bound once, after the
     initial testing of ac>0 and before the first patching of the macro body into the input
     stream.
                                               18
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               19
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
           DETAILED DESCRIPTION OF ALGORITHM FOR PROCESSING MACROS
   (1) If the command was 1? then the splice-enabling flag is set according to the contents of the
ac, but if the command is 1! then the flag is set to TRUE regardless. Text is scanned until a delimiter
is seen, and the <NAME> thus scanned is looked up in the table of existing macros. The body of the
macro is saved to be used later, and an empty list of arguments is set up. The delimiter at the end of
the <NAME>, which should be either a semicolon or an open-nesting or quoting character, is now tested:
   (2) If that character was a semicolon, then go to (5); If it was a legal open-nesting or quoting
character, then look up the corresponding close-nesting or quoting character in the nesting table inside
POX and save it for later reference, then set nesting depth to zero and enter a scanner in which input
continues to be read and brick commands continue to be executed as they occur, but output is fed into
an argument-body that is being constructed. Paragraph (3) describes this scanning process, and
paragraph (4) describes what happens when brick commands are seen during the scanning.
   (3) Read a character.
   If it is the close-nesting or quoting character then we decrement nesting depth, then depending
on its resultant value do the following: DEPTH<0, close off this argument-body, put it in the table of
arguments, read one more character, and go to (2) [THIS IS THE ONLY EXIT FROM THIS (3) SCANNING
LOOP]; DEPTH=0, do nothing, continue (3) scanning; DEPTH>0, emit the character (close-nesting or
quoting) into the argument-body and continue (3) scanning.
   Else if it is the open-nesting character then (assuming VERRHT is enabled) increment nesting
depth, then depending on the result do the following: DEPTH=1, do nothing, continue (3) scanning;
DEPTH>1, emit the character (open-nesting) into the argument-body, continue (3) scanning.
   Else if DEPTH>0 then emit the character into the argument-body (thus 1 and <COMMA> are quoted
rather than being acted-upon as below) and continue (3) scanning.
   Else if the character is a comma then do the following: If VE1LES is on then emit the comma into
the argument-body and continue (3) scanning; else close off the argument-body and put it in the table
of arguments, then open a new argument-body and continue (3) scanning.
   Else if it is the brick character then parse the brick-command as described in (4), and continue
(3) scanning when done.
   (4) Brick-commands are parsed in the usual way, except that certain commands (such as
font-select) are not implemented because they emit rubouts which are not permitted in arguments, and
a few other commands that do strange things are also not implemented. When considering brick
commands that generate text, it is important to distinguish between those commands which emit a
character into the output stream (the argument body) directly (these commands are 1Aq, 11 and
1"<CH>) and those which splice text into the input stream (these commands are 1Dq, 1!..., 1?..., 1@...
and 1α...). In the latter group of commands, the spliced text will be seen later by the (3) scanner, and
if the spliced text contains any of the special characters mentioned in (3), then the corresponding
special effect will of course occur. (It is generally a good idea to avoid this except in those cases
when such complicated things are actually needed to achieve a complicated effect, as shown in some of
the advanced examples below.)
   The 1! and 1? commands are especially interesting when they not only are executed while
scanning an argument but they contain arguments themselves. What happens is that all
status-information about this level of argument-scanning (inside the parsing of the macro-call command
that began earlier) is saved on the stack, and this piece of code in POX (i.e., (1) thru (5) as described
here) is entered recursively to parse the new level of macro-call and arguments to it. Then when that
level of this piece of code returns, after splicing the input stream, that status-information is restored
and scanning is resumed at this level as if nothing had happened (except, of course, that since the
input stream has been spliced, the output from that lower-level of macro-expansion will now be seen
by the scanner at this level).
   Users of LISP 1.6 and variants thereof will note, in the case where no parsing side-effects occur
(i.e., when <COMMA> <OPEN> and <CLOSE> are not included in the spliced text) and there is exactly one
macro call or one quoted string of text in each argument, that the final result of POX macro expansion
is exactly the same as the corresponding LISP s-expression EVALuation in which every function is
either an EXPR or a MACRO. For example,
                  1!FOO(1!BAZ(1!FB;);,1!GAR(FG););
is equivalent to the s-expression (FOO (BAZ (FB)) (GAR (QUOTE FG))). In POX there is the
additional facility of appending together the strings that are generated by multiple macro-calls and
quoted strings in a single argument, for example:
                      1!FOO(BAZ1!GAR(FG););
is roughly equivalent to (FOO (APPEND (QUOTE BAZ) (GAR (QUOTE FG)))) or something like that.
   (5) [The only way to reach this piece of code is to jump here from (2) after seeing a semicolon
                                               19
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               20
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
there.] If the splice-enabling flag was not set above, then all the arguments scanned in (3) etc., and
the macro body saved in (1), are now flushed (the only purpose of all this scanning was to make the
syntax come out right at this level, although any side-effects (such as storing a value in a register or
defining a macro or overlay) during scanning arguments will of course remain done); If, however, the
splice-enabling flag <\SU\>was<\EU\2,3> set, then the current input stream is now IOPUSHed so that it can be resumed
later when the expanded macro we are generating has become exhausted, and the input is now
switched to the macro body we looked up and set aside in (1) above, with the list of argument-bodies
standing by to be referenced whenever an <ARGn> token appears in the macro body. In any case, this
long-winded piece of code for scanning macro-calls now returns control to whoever called it at this
level. (The equivalent thing in LISP 1.6 evaluation of s-expressions is that the call to an MACRO
generates an expression which is then re-evaluated by the implicit EVAL that called it while evaluating
arguments to a higher EXPR or MACRO -- you may also compare POX macros to EXPR's, which produce
the same effect as MACROs, although by a different mechanism -- of course, this parallel breaks down
if commas or unmatched nesting characters are returned, in which case rather bizarre parsing
side-effects can occur in POX -- in this respect, LISP is cleaner, the only way to make similar things
happen is to explicitly mung the stack.) See (6) for what actually happens now when higher-level
routines attempt to input characters from the macro-body with argument-list that now constitutes the
input stream.
      DESCRIPTION OF ALGORITHM FOR READING TEXT FROM A COMPOSITE INPUT STREAM
   (6) When any routine requests to input a character, the character comes from either an input file
or a macro-body or an argument-body (which is treated exactly like a macro-body except that the list
of arguments is always null in this case, i.e., arguments cannot themselves have arguments). When any
file or macro-body is exhausted, an IOPOP occurs, so that input continues from the next-higher input
stream that was suspended earlier. (When the top-level file is exhausted, an END-OF-FILE signal is
passed up and causes POX to close out processing and exit.) Finally, if a special token is seen while
reading from a macro-body, the following actions are automatically taken: The <BRICK> token is
replaced by the current 1 character; the <ARGn> token (if the table of arguments contains at least n
arguments) causes an IOPUSH of the macro-body (with associated table of arguments), and causes input
to be switched to that n<\BA\13>th<\BA\0> argument-body, which will now be used until it is exhausted, at which time
the original macro-body will resume.
                  Examples of macros with arguments
Here's the sbp macro definition referred-to earlier, and also used later to demonstrate the argument
binding-evaluation process:
      18sbp(main,sub,sup)[1F11⊗⊗⊗main⊗1←.1→01↑=15;1F2⊗sup⊗1←.1→11N
      1←01→.1↓=12;⊗sub⊗1←.1~11→.1⊗⊗1F1]
                Detailed examples of argument evaluation
    (The macros called from here, and the fonts used here, are defined in POX2.POX[CSP,DOC].)
\!sbp(X,i-1,n);\;Nothing special here, matching nesting characters, commas
X<\BA\-13>i-1<\BA\13>n<\BA\0>
\!sbp(X)(i-1)(n);\;One of several other ways to do the same thing
X<\BA\-13>i-1<\BA\13>n<\BA\0>
    (You must do 1⊂'400; or equivalent before the syntax of nesting (below) will be allowed.)
\!sbp(X,(\f9i)-1,(\f9n));\;Inside multiple-nested, everything is quoted
\; Thus evaluation of \f9i doesn't occur while binding, but later
X<\BA\-13>i<\BA\-13>-1<\BA\13>n<\BA\0>
\; \!sbp(X,\f9i-1,\f9n); would not have worked
\!sbp(X,(i,j+1),n);\;Even commas are quoted rather than breaking to next arg
X<\BA\-13>i,j+1<\BA\13>n<\BA\0>
\!sbp[X,i,(n)];\;Nesting only applies to the particular nesting pair in use
                                               20
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               21
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
X<\BA\-13>i<\BA\13>(n)<\BA\0>
\!sbp(X,i,((n)));\;Only the pair at comma-level are snarfed
X<\BA\-13>i<\BA\13>(n)<\BA\0>
\!sig;\!sbp(,i=1,n);\;Null args are just as good as any others
<\BA\-13>S<\BA\-13>i=1<\BA\13>n<\BA\0>
\!sbp(NESTING CHARACTERS:,⊗⊗//↓↓∂∂||""∧∧∨∨∪∪∩∩↑↑!!$$%%)|() [] {} <> ≤≥ ⊂⊃ →←|;\;
\;Sometimes you want to pick a nesting character you aren't using in the body
NESTING CHARACTERS:<\BA\-13>⊗⊗//↓↓∂∂||""∧∧∨∨∪∪∩∩↑↑!!$$%%<\BA\13>() [] {} <> ≤≥ ⊂⊃ →←<\BA\0>
\!sbp[X,f(i,j),n+2];\;Avoid expressions like this, their implementation may change
X<\BA\-13>f(i<\BA\13>j)<\BA\0>
\; -- Define a bunch of month names as if they were elements of an array almost
\∞MONTH1⊂January⊃\∞MONTH2⊂February⊃\∞MONTH3⊂March⊃\;
\∞MONTH4⊂April⊃\∞MONTH5⊂May⊃\∞MONTH6⊂June⊃\;
\∞MONTH7⊂July⊃\∞MONTH8⊂August⊃\∞MONTH9⊂September⊃\;
\∞MONTH10⊂October⊃\∞MONTH11⊂November⊃\∞MONTH12⊂December⊃\;
\8MONTH(NSTR)[\!MONTH⊗NSTR⊗;]\; -- Generates the name of month, takes decimal string
\u'400101;\;      ACCTIM UUO = CALLI 400101
\L=-18;\/=31;\→D\%=12;\+=1;\→M\;Month number in register M now.
\!MONTH(\DM);\; (1) Scan and evaluate and bind argument, resulting
\;                      in effectively \!MONTH(4); if this is still April
\;                      (it was when this paragraph was first written)
\;              (2) Call macro with argument list to generate a splice
\;                in the input stream, which reads: \!MONTH4;
\;        (3) Continue reading characters from whatever the input stream is now,
\;          namely the string \!MONTH4; followed by the rest of the input file.
\;  (4) The \!MONTH4; now binds an empty list of args, calls the macro MONTH4,
\;    and splices the string April into the input stream, which is then read
\;    and output in the current mode (pass-as-is in this example).
May
LISP programmers will note that this is quite similar to the way EXPRs are evaluated in LISP. In
fact, the following macro definition will create a macro that acts like EVAL in LISP, namely
EVAL(expression) causes expression to get evaluated twice, once while evaluating and binding
arguments, and then again when the result of the macro expansion is seen in the input stream. The
usefulness of this is that you can patch together various strings, some quoted (you get what you had in
the input file) and some resulting from macro calls or commands like 1D, and then the resultant
string gets evaluated as if it had been in your input file all along. For example, the above effect of
MONTH(NSTR) can be obtained by calling EVAL with the appropriately constructed argument.
\8EVAL(expr)[⊗expr⊗]\;As described above
\!EVAL[[\!MONTH(]\DM);];\;(1) The following is output to the argument body:
\;                      (a) The quoted string \!MONTH(
\;                      (b) The decimal string value of register M
\;                      (c) The close-parenthesis and semicolon
\;              (2) The string spliced in is \!MONTH(4); if this is still April
\!EVAL[\\!MONTH(\DM);];\; An older way that still works, quote the escape character by \\
\; -- you see it below done both ways on the same line, no difference in effect --
MayMay
\; Evaluate a macro and use the result as a brick command to evaluate:
                                               21
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               22
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
\!EVAL(\\\!FOO;);\; Like \\!FOO; parsed right-to-left sort-of
$8RECURSExFOO(N)[$F3(FOO)$←=⊗N⊗;$-=1;$?RECURSExFOO($D∀);]
$; the above macro explicitly calls itself with one less than its argument
$!RECURSExFOO{15};$; {} are just as good as () in such places as here
(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)(FOO)
   Here is a macro that can be used to compile page numbers into a table of contents or index,
providing that the contents or index appears in the output file after all referenced items have
occurred. This is the macro used in the POX writeup to make the contents and appendix page
references.
      $8DEFCONT(ITEM)[$!EVAL(($∞CX⊗ITEM⊗{)$←#$¬=10;$?SPACEXY;$D#(}));]$;
   The three types of nesting characters, [] () and {}, are used to isolate nesting processing into
three levels in which the other nesting charcters are passed as text. This macro assumes that register
# always contains the correct page number, and that there is a macro called "SPACEXY" which
generates an ASCII 040 (space) character to be used as zero-fill to the left of one-digit numbers, and
that page numbers above 99 do not occur. Here's a detailed description of what happens when this
macro is used:
   $8...; at start of the file -- A macro with arguments is set up, with the name "DEFCONT", and the
body <BRICK> "!EVAL((" <BRICK> "∞CX" <ARG 1> {)" <BRICK> "←#" <BRICK> "¬=10;" <BRICK> "?SPACEXY;"
<BRICK> "D#(}));" where <BRICK> denotes the 1 token (stored internally as 177,175), <ARG 1> denotes
the argument-number-1 token (stored internally as 177,001), and other parts are between quote marks
here to avoid ambiguity as you try to read this. (This assumes you have VERESC turned on. Otherwise
you just get the dollar-sign character in the macro body instead of the 1 token, and what happens
later in this example when "\" is the brick character won't work.)
   \DEFCONT(A3); at the location in the file desired ("\" happens to be the brick character here) --
The body of the DEFCONT macro is patched into the input stream, and in the process of reading it in
the <BRICK> and <ARG 1> are replaced by "1" and "A3" respectively, resulting in the following string
being effectively in the input stream: "\!EVAL((\∞CXA3{)\←#\¬=10;\?SPACEXY;\D#(}));".
   The "EVAL" macro is then called, and in the process of binding its one argument the following
happens: (1) The string "\∞CXA3{" is passed as (quoted) text; (2) Register # is fetched and tested to
see if it is less than ten, if so the SPACEXY macro generates a space character (in the
argument-to-EVAL being constructed); (3) Register # is fetched again , converted into decimal string,
and appended to the argument; (4) The string "}" (one character) is passed (quoted); (5) The input text
");" terminates the binding of the first argument, and terminates all binding for the call of EVAL, and
the body of EVAL, which consists solely of the <ARG 1> token, is patched into the input stream.
   Thus if this is done on page 5, the string "\∞CXA3{ 5}" (the argument) is now effectively in the
input stream. Upon reading all that (generated) input, the macro "CXA3" is defined, with body " 5".
   Later, for example in the table of contents page, the string 1!CXA3; will generate the correct
page reference for item A3 in the document, namely the string " 5" in this case.
   Here is the setup for the EVERYPAGE macro that was used in this writeup (\ is escape char.):
\!ACCTIM;\; load a register with system date-time by means of the 1u command
\!EVAL((\∞TODAY[)\!DATIME;(]));\;
\; call DATIME (in POX3.POX[CSP,DOC]) and hardwire the result into the TODAY macro
\∞IDENT[POX writeup -- compiled by POX on ]\;
\oEP1[2\!IDENT;\!TODAY; -- page ]\; hardwire all but the page number into an overlay
             and here is the actual macro definition ($ is escape char.):
$8EVERYPAGE(dummyarg)[$←#$+=1;$→#$oEP2{2 $D#}$&EP←EP1&EP2;$N
$QA$1EP;$→A$2EP;$¬A$/=2;$+=850;$→A$N
$WEP,A=150;$WEP,A=2100;$qA]$; generate page number, combine overlays, align
   Note that some tricky things were done in creating the everypage macro so that the time-of-day
wouldn't be recompiled on every page (otherwise if the system were very busy, each page might have
a different time-of-compilation). (Now that this writeup uses time-last-edited instead of
current-time-during-compiling, for page headings, avoiding recompiling the header merely saves a
slight amount of time during compilation.) In general, in POX the order of evaluation of arguments may
                                               22
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               23
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
be controlled by means of calls to EVAL (to cause an extra evaluation to occur) and using nesting
characters to quote portions of arguments (to suppress or postpone an evaluation). The following
example should show you some of the options you can create by use of this technique.
   Suppose that MONTHNUMBER is a macro that asks the system for the date and time, and decodes
the number of month (0 to 11 decimal) leaving it in register M. Suppose that MONTH1 is a macro that
is the ASCII name of the first month (January) etc. up to MONTH12 = December. Suppose that
MONTHN(n) is a macro with one argument that concatenates the string "$!MONTH" with its argument
(assumed to be a decimal number string) and with a semicolon, so that for example "$!MONTHN(3);" will
patch "$!MONTH3;" into the input stream which will then generate "March". The following commands
will then generate the correct result, assuming this month is neither January nor December:
$!MONTHNUMBER;$;
This month is $!MONTHN($DM); and next month is $!MONTHN($←M$+=1;$D∀);.
Last month was $!MONTHN($←M$-=1;$D∀);.
   Note that if the contents of register M are changed, the result of calling MONTH($DM) changes
accordingly, and if any of the MONTH1 MONTH2 ... MONTH12 macros are changed (such as to a set of
abbreviations for the months) then the result of calling MONTHN will change in the particular cases that
were changed. That is because register M is referenced and macros MONTHN($DM) and MONTH6
(assuming this is still June) are called every time $!MONTH($DM); appears in the input stream. Thus if
THISMONTH is defined as the successive calling of MONTHNUMBER and MONTH($DM) then everytime
THISMONTH is called register M will be clobbered and MONTHN($DM) and MONTH6 will be called. By
appropriate control of evaluation, it is possible to call some of those things once at the beginning
(when THISMONTH is defined) and hardwire their results into the definition of THISMONTH:
$!EVAL(($∞THISMONTH[)$!MONTHNUMBER;$!MONTHN($DM);(]))$;
$; "$∞THISMONTH[" is quoted, "$!MONTHNUMBER;" and "$!MONTH;" are called
$; resulting in the string "June" if it is still June, "]" is quoted, and
$; all these parts are concatenated into one string which is passed to
$; EVAL as its argument "$∞THISMONTH[June]" which is then patched into
$; the input stream, causing THISMONTH to be permanently defined as "June".
$!EVAL(($∞THISMONTH[)$!MONTHNUMBER;($!MONTHN{)$DM(};]))$;
$; "$∞THISMONTH[" is quoted, "$!MONTHNUMBER;" is called resulting in register
$; M getting defined now, "$!MONTHN{" is quoted, the decimal conversion of
$; the contents of M we have just computed earlier come next, then "};]"
$; is quoted, and all the above is concatenated into
$; "$∞THISMONTH[$!MONTHN{6};]" which causes THISMONTH to be defined so as
$; to call MONTHN(6) every time.  Thus register M is freed for other use
$; without affecting THISMONTH but redefinition of MONTH6 will cause
$; THISMONTH to change accordingly.
                     ALTERNATE OUTPUT FILES
   Whereas the 1@ command reads in a file and processes it as if the text in it had been edited into
the main input file, the commands in this section are used to write text into a file (overwriting any
existing file by the same name), usually for the purpose of reading it back in later and processing it
further at that time. Thus a table of contents or a batch of footnotes can be generated over the
course of a complete document or a chapter, then read back in at the end and emitted fully processed
into the main (.XGP) output file. A table of contents emitted at the end of a document can of course be
moved up to the front of the document before binding.
1<q<FILNAM>;(U J CR o) -- open the file <FILNAM> on logical i/o channel q. Available
         logical channels are numbered from 1 to approximately 10 (decimal) so I
         don't expect any normal users to run out of channels. The following
         command, for example, will create the file CONT.TMP on your default
         (DSKPPN) disk area: 1<=1;CONT.TMP; .
1=q<OPEN><TEXT><CLOSE>
         (U J CR o A) -- select logical i/o channel q for output, parse the text
         between matching <OPEN> and <CLOSE> exactly the same way as if it
         were an argument to a macro (except that comma doesn't cause break
         in parsing because only one "argument" is ever parsed). The result of
         parsing the text is written into the file open on that channel. After
         reaching <CLOSE> the output is switched back to normal but the
                                               23
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               24
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
         alternate output file is left open in case additional 1= commands are
         issued. Of course, if several alternate output files are open
         simultaneously, chunks of text may be emitted into them in whichever
         sequence the user desires by using one 1= command for each chunk.
         (Note, just as in arguments to macros, only pure ASCII text may be
         generated, not XGP escape sequences like font selects etc. Typically
         what is emitted are sequences that include the brick character, quoted
         so that the brick characters are actually emitted into the file rather
         than evaluated now, then when the file is read back in the brick
         commands will be evaluated (executed).)
1>q   (U J CR o) -- close the file on logical i/o channel q. This must be done
         before the file can be read back in or accessed by another program.
1E<IN><\BA\-10>1<\BA\0><OUT><\BA\-10>1<\BA\0> ... <IN><\BA\-10>n<\BA\0><OUT><\BA\-10>n;
         (U J CR o A) -- start up a pseudo-teletype inferior job under POX, type
         <IN><\BA\-10>1 into it, wait until it types out all of <OUT><\BA\-10>1, continue alternating
         input and wait for output through <OUT><\BA\-10>n, then release the PTY. This is
         useful for running SSORT across a file that has been written out during
         compilation of a document before reading it back in as the last part of
         the compilation.
Example of generating footnotes for end of the chapter:
\<=2;FOOT.TMP;\←=0;\→#\NAt front of chapter, open file and reset page number
\==2;(\←#\+=1;\→#\NEach footnote:  Increment footnote counter, then...
\D#\"\jMcCarthy, John, LISP 1.5 Programmer's Manual.\"\.
)\N       Emit footnote number in decimal at left margin, pass a quoted
         brick j command, pass the text of the footnote, pass a quoted brick .
         command, de-select alternate output. Normally all this would be defined
         as a macro that took the text between the \j and the \. as an
         argument.
\>=2;\N                   At end of chapter, close the file
\@FOOT.TXT;\Nand read it back in (and parse it) in one chunk.
                    ENABLING SPECIAL FEATURES
   In the following three commands, the left half of q, specifies a batch of features, and the bits in
the right half specify which features in that batch are affected (or in the case of the first command,
which are on, since all are affected one way or the other in this obsolete command). Thus you may
change as many features in one batch at a time, but must use separate commands for each batch. The
commands are given first, then the descriptions of each feature, with the batch number and bit position
(mask) that correspond to it. All bits are initially zero, and bits not mentioned below should be left
that way to allow for new bits that will be defined later.
1`q  (U) -- set special features halfword from right half of q -- This command
        is not recommended because it clobbers bits you may have set earlier
        and forgotten.
1⊂q  (U) -- use right half of q as a mask for turning on bits, leaving the rest
        unaffected.
1⊃q  (U) -- use right half of q as a mask for turning off bits (a "1" in the mask
        turns the bit off, the same as the ANDCM instruction), leaving the rest
        unaffected.
Until you use any of the above commands to change these flags, all the bits listed below are
not-enabled (zero bit). Generally it is advisable to turn bits on at the beginning and leave them on,
however it is frequently useful to toggle them on and off. If funny things can happen with toggling, I
will try to warn you in the description below -- please excuse the sloppy (unjustified) appearance, the
text was copied from the source program for POX with very little editing. Also, the "$" character
rather than "1" represents the brick character below.
   I recommend that all newly-created POX files turn on VERSMT, VERXX1 and VE1QES near the
                                               24
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               25
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
start of the file. Also desirable most of the time are VERSIM, VERSGK, VERREM, VERRHT, VERESC and
VE1OPN. All of these can be turned on by 1⊂'0302454;1⊂'1000003; at the very beginning of your
source file. I recommend against using VER56P, VERREG and VERIDC.
; THESE BITS ARE IMPLEMENTED CURRENTLY:
    Batch (left half of q) = 0
VERHHR←←000001;ENABLE H AND h HEIGHT OF FONT PSEUDO-REGISTER -- Has its effect at
  the moment you attempt using any command that takes a register as an argument,
  and you specify register "H" or "h".
VERTRC←←000002;TRACE AND OTHER TTY OUTPUT
VERSIM←←000004;ENABLE <LF> SIMULATOR, ENABLE SIDE EFFECT OF REGISTER ";"
  ;This simulates XGPSER enough to know at all times where it is on the page
  ;It allows sorting each output thing according to Y0 so that XGPSER doesn't complain
   WARNING -- This bit can not be turned off at all (I haven't implemented it because it doesn't
seem like a good idea for several reasons) -- Regarding turning it on, if you turn it on after one or
more pages of text have been output, the bottom margin will probably get screwed up -- If you turn it
on after text has been output on the current page, the xspooler will probably abort due to incorrect
Y0 sequence -- In conclusion, you should turn on the simulator before any text is output at all, or not
at all.
   WARNING -- You must do at least one 1F after turning on the simulator before outputting any
text, or you will get screwed.
VERSGK←←000010;Double-gap after . : etc. if double-space input
VER56P←←000020;ENABLE $5 AND $6 INITIALIZATION WITH TLIM1 AND BLIM1 DATA --
  See BUG#2 -- Takes effect when a $M command is executed on a font not previously
  loaded.
VERREM←←000040;ENABLE REM'S SYNTAX FOR MACROS WITH ARGS DEFINITIONS -- Takes
  effect when the macro is being defined.
VEREVE←←000100;ENABLE EVERYPAGE MACRO
  ;If on, once on every new page of output it simulates 1!EVERYPAGE; occurring in
  your input file (at the first occurrance of <CR><LF> or 1;...<CR><LF> while in
  pass-as-is mode, or a few other places -- If you want this to happen on the page
  where you turn on the feature, you will have to do 1!EVERYPAGE; yourself once there.
  WARNING!! -- Because of the fact that this macro is called at an almost-random
  location with respect to your input file, it must be constructed so as to
  avoid clobbering anything (registers or input syntax, usually) that might
  confuse the main processing of the file.  Any registers used should be saved
  and restored using push/pop commands.  Watch out for $
 $N $; $, etc. which
  will cause strange and confusing destruction of your world if the terminating
  <CR><LF> or <FF> or whatever is missing from your everypage macro.
;000000 000200;(RESERVED FOR FUTURE COLIST-KLUDGE)
VERRHT←←000400;ENABLE MODIFIED WAY TO PARSE ARGS THAT HAVE NESTING CHARS IN THEM
  (i.e., anything inside nesting inside nesting is quoted, etc., see
   the earlier section "Detailed examples of argument evaluation")
  Takes effect when a parameter is being parsed prior to being bound to dummy arg.
VERREG←←001000;$'<OCTAL>; OLD WAY -- 177 ALWAYS EVEN IF IT DEFEATS POX QUIETLY
VERSMT←←002000;$'<OCTAL>; NEW WAY -- 177 ONLY IF NEEDED
VERIDC←←004000;SPECIAL REQUEST BY RHT, NO ERROR IF ; OMITTED AFTER MACRO CALL
VERPAG←←010000;AUTOMATIC PAGE CHANGE W/OUT FIRST WARNING, TEXT AND $O OUTPUT OVL
            (If the input file is exhausted when page-overflow
             happens, POX changes pages even if this  switch is off,
             since it can't show input-context at that point.)
VERLCS←←040000;CHANGE WAY TABS IN PASSIS ARE DONE TO 1/10 OF RMAR-LMAR * INPUT COL
  WARNING -- Only tabs in input file do the right thing.  A counter
  keeps track of what column in the input file we are at, and
  rounds up to multiple of 8 when a tab occurs in the input FILE
  (not in a macro expansion patch).  Thus any text just after a tab
  in the input file will appear on the output page in approximately
  the same column on the XGP.  Note that a tab in a macro will
  activate this mechanism, but it will go to a position corresponding
  to the input FILE rather than what that file would have been with
                                               25
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               26
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
  the macros inserted in it.  Note that the three low order bits
  of the column counter are ignored also.  A warning message
  will be generated if a tab is encountered in a macro while not at
  a multiple of 8 columns, until such time as
  an implementation is found that satisfies everyone.
VERESC←←100000;CAUSES BRICK CHAR IN MACRO BODY TO BE SAME AS ⊗$⊗ FEATURE, i.e.
  the <BRICK> token rather than the character itself -- This bit is tested at the
  time the macro body is being parsed and associated with the macro name
  (at define-time during execution of the 18 or 1∞ command).
WARNING!! (75 AUG 03) -- The token in the macro body is replaced by the current brick character at
the time the token is rescanned as input, not earlier when the macro body is patched into the input
stream, so if your brick character at macro-define time was \ and the macro body includes \|$...$|\ it
will be compiled as <brick>|$...$|<brick> then if when you call it \ is the brick character, the <brick>|$
will be converted to \|$ and $ will be you brick character for ..., then $|<brick> will be converted to $|$
instead of the $|\ you probably intended, and you will totally lose just like this POX writeup did before
I located this subtle bug (in this writeup) and fixed it. If you want the effect desired (whatever the
brick char is, change it to $, then back again) you can probably make it work by having your macro call
EVAL with a quoted string containing the brick character, thereby forcing both <brick> tokens to be
replaced by the same brick character at argument-binding (arg to EVAL) time and used in both
instances. Note that this subtle problem happens the same with the old ⊗$⊗ syntax in macro bodies.
VERXX1←←200000;IMPLEMENTS CORRECT OUTPUT-OVERLAY AS OF 1975.JUL/AUG
VERVER←←400000;ENABLES TYPEOUT OF SPECIAL FEATURES ON/OFF
    Batch (left half of q) = 1
VE1QES←←000001;SUPPRESSES CRUFTY OLD 11 "FEATURE"
VE1OPN←←000002;OUTPUT PAGE NUMBERS TYPED
VE1RWG←←000004;(This feature no longer supported; use 1H command instead.)
VE1TSP←←000010;Erroneous tab in middle of justified line treated as space
VE1LES←←000020;Suppress side-effect of comma delimiting macro arguments
VE1FAI←←000040;Fail error mode, don't stop on errors
 (use altmode to get back to normal mode)
VE1EOF←←000100;CHANGES $, COMMAND TO STOP AT IOPOP (SUB-EOF) AS WELL AS FORMFEED
VE1WHT←←000400;CAUSES QUIET SKIP OF WHITE SPACE IN MANY SPECIAL-SYNTAX PLACES
VE1DON←←001000;SUPPRESSES WARNING MESSAGE ABOUT INCOMPATIBLE IMPROVEMENT IN
            ; RIGHT-KERN FOR OVERLAYS, AND $H-OF-NULL-OVERLAY ERROR MSG
        For example, the command 1⊂'446; will turn on the simulator and enable
        the full REM macro-with-argument syntax with ability to quote portions of
        arguments and cause trace output to appear on your terminal as POX
        runs. The command 1⊂'1000001; will turn on the bit that deletes the
        11 command. At a later time 1⊃'2; will turn off the trace without
        affecting the simulator or macro-with-arguments or any other
        special-feature bits.
                 REMARKS ON USING THE POX PROGRAM
   If you have the VERTRC flag enabled (see the 1⊂ command et al) various random things will get
typed out while POX is running, including text in your input file appearing after 1; and 1, commands.
For the most part you may ignore them. If you really want to know about them, ask REM about
particular ones, or look in the source program for POX. These trace outputs are all subject to purge at
any time as POX develops.
   To enable some of the new features implemented after 1974 Nov which conflict with old
features, special flags must be set earlier in your input file (see the 1⊂ command et al) -- The
definition of register ∀ as the accumulator, and the newly-implemented side-effects of q-register ","
are automatically in effect and can not be inhibited except by using an old version of POX (before
74.DEC).
                        Backtrace package
   There are 5 kinds of errors that can occur while POX is compiling a text file: (1) E40 = bugs in
the user file from which it might be possible to continue if the parser is correctly synchronized or if it
                                               26
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               27
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
will re-synchronize itself soon enough to be able to do the rest of the file mostly correctly. (2) E40F
= "fatal" bugs in the user file from which continuation is not possible but context information is
available and might be helpful to the user. (3) ERRF = errors caused by the input file that have wiped
out all context information -- This usually happens at the end of a file while inside the mode of building
up the body of a macro or macro-argument, caused by a missing parenthesis somewhere. (4) FATAL =
bugs in POX in code that is in a state of debugging and still has ASCII warning messages for detected
errors. (5) INTERR = internal errors detected in POX program, in code that shouldn't have anything
wrong with it, probably core clobberage rather than POX bugs.
   In E40 errors the error message is typed out, then the current level of macro expansion or file
input is typed out in about the same way as the SAIL compiler announces compilation errors, then the
user has the following options:
   →<\BA\1> <\BA\0>Hit C to close the main output (.XGP) file, patch in the list of fonts used so-far, and exit
immediately as if the input file had ended with no error;
   →<\BA\1> <\BA\0>Hit P to proceed with the program -- when proceeding from illegal brick command while
binding argument to macro, the text of the illegal command is passed unevaluated to the argument just
as if it had been quoted;
   →<\BA\1> <\BA\0>Hit <ctrl><meta>P to clobber the error-call to a NO-OP and proceed. Thus if the same error
happens no message will be generated and it will proceed as if you had typed P each time;
   →<\BA\1> <\BA\0>Hit R to remember the current location in the source file and proceed;
   →<\BA\1> <\BA\0>Hit <ctrl><meta>R to remember, clobber, and proceed;
   →<\BA\1> <\BA\0>Hit Q to perform skip-return instead of direct return as in the P command. In places where
this is implemented it causes the special mode (such as justify) to be left immediately before resuming
processing of input;
   →<\BA\1> <\BA\0>Hit <ctrl><meta>Q to clobber the error call to a CAIA (skip always) instruction, then perform
skip-return. This command is provided only for experienced users who are willing to take the risk
inherent in this command;
   →<\BA\1> <\BA\0>Hit T to pop up one macro level and do a context display there too [the pop-up is for the
displayed output only, it doesn't change the point where the program would resume if P were hit later]
-- If you have popped up to an actual input (DSK) file, or were there already, you can't pop up further
because implementating that capability in an obvious way WOULD clobber the context;
   →<\BA\1> <\BA\0>Hit E to return to display editor at this location in the input file. The only way that currently
exists for getting from E back to POX automatically with the correct top-level file, is to have a do file
that says: POX <FILE>↔ and to type to the system DO <DO FILE NAME><CR><LF> the first time you run POX,
then afterward to use the <CTRL><META>X G<CR> command in E;
   →<\BA\1> <\BA\0>Hit <ctrl><meta>E to return to display editor at the location you had it remember earlier
(Warning, if you had it remember more than one earlier location, it isn't supported what this command
will do.);
   →<\BA\1> <\BA\0>Hit D to go into debug mode (i.e., RAID). Hit <ctrl>P to return from RAID to the backtrace
package;
   →<\BA\1> <\BA\0>Hit <CALL> to do anything else, like to edit with SOS, or to give up entirely, or to "F DSK" then
see what POX outputted before the error occurrred.
   From E40F errors all the above are available except those which involve proceeding.
   If you want to examine your output file according to how the XGP service parses it, R XGPTYP.
For investigating new bugs in a large file, a useful technique is to run XGPTYP on both the output from
a backup working version of your file and the output from the version you are debugging, then R
SRCCOM and TTY:←<OLD XGPTYP LISTING>,<NEW XGPTYP LISTING>.
   If your file looks ok but you get the message XGPSER MISSED IT. then try appending to the
end of the XSPOOL command the switch /NTNODE=31, then if it still doesn't work discuss it with RWG
or REG who are experts at this.
             Known Bugs in POX (Referred-to earlier in writeup)
   BUG#2 -- Font FORN25 and other fonts with funny width characters cause a fatal error, and
parameters 5,6 don't usually work correctly. [New bug since 15 and 16 were implemented, the bad
code has now been patched-around, so that normally no bug will occur but 15 and 16 will give
incorrect data, but if you use the 1⊂'20; switch you take your chances -- someday the code may be
really fixed.] -- 1976.JAN.03 I haven't changed anything but the fatal error no longer happens,
perhaps because FORN25 has been changed recently. The measurements are still wrong, however.
                                               27
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               28
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                 NOTES (Referred to earlier in writeup)
(NOTE 1) -- Everywhere, except at the start of the top-level file, POX reads characters in the normal
sequence, and expects all syntax to be left-to-right decodeable. This is why, for example, the string
11!FOO;, if seen in top-level left context, is parsed as [quote the escape character, then output the
string "!FOO"], rather than as [expand the macro FOO then execute the command that results from a
brick character in front of it].
   However, at the start of the first top-level input file a special initialization parser is employed
that pre-reads the first two characters then decides what to do regarding syntax. The following table
shows the first characters and what happens (here "∀" means any character not mentioned previously
in the same context, "∀∀" means the two copies of some character, "∀∃" means two different
characters):
   C -- assumes this is a TV/E directory -- skips everything until ASCII '014 (Form Feed) is seen,
then prereads again using only the options below this one.
   ∀| -- assumes this is a "change the escape character" command -- jumps into the middle of the
1|<CH> code -- in my opinion, this is the preferred way to begin a POX file and all new files should
begin this way -- for example, your file might begin with \|\\⊂'4;\M0FIX25;\M1BDR30;\; which
would define \ as the 1 character, change it to \ (i.e., no change), turn on the simulator, define two
fonts, and suppress the <CR><LF> at the end of the line -- Note that because most users of POX prefer
to use "\" as their brick character, if you plan to use some character other than \ as the brick
character in your file, and you want your file to be callable (with minimum hassle) as a required source
file from some other file, you should probably begin your file with \|1 (where 1 denotes your local
brick character) and put 1|\ at the very end of the file. -- Note that this does not apply to libraries
of macros, in which the 1| command is currently ignored, and you should avoid changing the brick
character to anything other than "\".
   ∀∀ -- assume this is a bare (out-of-syntax) occurrence of the escape character for purpose of
defining it the old way (1973 MAR-APR), followed by the beginning of a POX command -- jumps into
the middle of the escape code at the point just after the 1 has been recognized.
   ∀. -- assume this is an old-style 1; command (don't rely on this, it is incorrect) -- ignore
through next <CR><LF> then jump into beginning of PASS-AS-IS loop.
   ∀; -- assume this is a skip-to-crlf command -- does it (see above).
   ∀∃ -- assumes the first is the escape character and that the user is confused about what to do
next -- jumps into the PASS-AS-IS loop just after a character has been read, to be able to act upon
the ∃ character -- because ∃ is not the brick character, an error will be generated because POX will
attempt to output the ∃ character but no font has yet been defined.
(NOTE 2) -- THIS NOTE PURGED -- SEE COMMANDS 1` 1⊂ 1⊃
(NOTE 3) -- Of course, since the expansion of a macro generates a new string of text as if it had been
in the input file originally, syntax can be altered if the body of a macro begins but does not complete
some escape sequence. Thus the definition 1∞FOO[1oBIGMESS{4] will set it up so that 1!FOO; will
begin the definition of an atomic text overlay but not finish it, until some time later in the file an
unmatched "}" occurs. This can be confusing, so watch your macros carefully.
(NOTE 4) -- In normal mode, letting the system do <LF> itself or simulating what it does, subscripts etc.
cause irregular spacing of lines because each line takes up just as much space as it needs to avoid
overlap. If the system is doing <LF>'s all by itself (the only mode currently implemented), the POX
program hasn't the vaguest idea where on the page the current line of text will be located when the
system gets around to putting the output onto the XGP. However, if POX is simulating what the system
would do, then POX is using register ";" and a couple of internal locations to keep track of the last
scan-line used, etc.
   In pretty-spacing mode, the baselines of the text lines are caused to be evenly-spaced even if
overlap occurs or font size varies. This is done by computing where the top scan line should be (Y
position of baseline desired, minus Y offset of worst-case superscript) and telling the system to do the
line there (BLETCH! BLETCH!). This mode is obtained by setting the ε parameter to correct line spacing,
and setting the λ parameter sufficiently negative to allow all overlap that is expected without
spreading lines further apart.
(NOTE 5) -- If the font file is already compiled, the 1M command merely maps from the logical font
number you selected to the already-compiled system font number. If the font you requested is new
                                               28
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               29
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
but the logical font number is already in use, it finds a slot, loads the font, and maps the font number.
Thus you can re-use logical font numbers for multiple fonts (e.g., if you have a macro that uses a
specific logical font number, you can redefine what font that number refers to between calls to the
macro). There are only 16 (decimal) logical font numbers, and thus you can have at most 16 fonts
defined at any one point in the document, but by re-using font numbers you can have more than 16
fonts in the course of the entire document. The current upper limit is 32 fonts.
                            TRIVIA
PASACT -- For RAID experts, note that at PASACT+6 is a CAI (NO-OP) that is executed only when POX
tries to output a semicolon at passis-level. Patching it to a HALT or setting a breakpoint there is
useful for debugging a mysterous extra semicolon that you've created. If that doesn't find the problem,
try patching PUTCHR+1 too.
   As long as there is room in your mind, I might as well mention some major deficiencies of POX.
There is no way to do automatic footnotes or indexes or cross-references. Syntax is mostly strange.
POX doesn't have the primitives for measuring lengths of text strings (macro bodies), nor for taking
substrings. Also, without text-responses, ligatures can't be done conveniently.
   ONE FINAL TOUCH TO THIS WRITEUP -- The spirograph near the bottom of this page (or the next
if there wasn't room here) is a simple example of how to use recursive macros to make program loops.
It also shows you the overshoot that happens with almost-horizontal vectors of the 1v type.
_; DRAW SPIROGRAPH STARTING AT (X,Y)/D (x,y)/d offset by (8,9)
_∞SPIRO⊂_←X_→a_←Y_→b_←x_/d_+y_→y_+Y_→Y_←y_/d_¬x_→x_+X_→X_; wheel #1 perturbs #0
_←X_/D_+Y_→Y_←Y_/D_¬X_→X_; wheel #0
_←X_+8_→A_←a_+8_→a_←Y_+9_→B_←b_+9_→b_vabAB=2;⊃_; and offset for XGP
_;
_∞SPIROS⊂_!SPIRO;_←I_-=1;_→I_?SPIROS;⊃_;
_;
_←=800;_→8_←=1750;_→9_;
_←=-44;_→X_←=26;_→Y_←=2;_→D_;
_←=-29;_→x_←=69;_→y_←=1;_→d_;
_←=200;_→I_!SPIROS;_;
<\V\49,940,-6.031,32,12> <\VA\1>
<\V\49,940, .873,119,2> <\VA\2>
<\V\49,926,-4.922,39,10> <\VA\3>
<\V\49,895,-3.555,54,7> <\VA\4>
<\V\49,895, 1.197,96,3> <\VA\5>
<\V\49,926, .955,112,2> <\VA\6>
<\V\49,863,-2.752,69,5> <\VA\7>
<\V\49,863, 1.512,80,3> <\VA\8>
<\V\49,952,-7.832,24,15> <\VA\9>
<\V\49,952, .768,125,2> <\VA\10>
<\V\49,966,-11.625,16,23> <\VA\11>
<\V\49,966, .688,132,2> <\VA\12>
<\V\49,833, 1.875,65,4> <\VA\13>
<\V\49,833,-2.271,81,4> <\VA\14>
<\V\49,975,-22.500,8,45> <\VA\15>
<\V\49,975, .609,136,2> <\VA\16>
<\V\49,780,-1.037,133,2> <\VA\16>
<\V\49,747,-.918,149,2> <\VA\16>
<\V\49,811, .000,2,176> <\VA\16>
<\V\49,811,-1.162,117,3> <\VA\17>
<\V\49,795,-1.088,125,2> <\VA\18>
<\V\49,987, .535,142,2> <\VA\19>
<\V\49,764,-.971,140,2> <\VA\19>
<\V\49,804, 2.332,51,5> <\VA\19>
<\V\49,804,-1.932,90,4> <\VA\20>
<\V\49,734,-.863,154,2> <\VA\20>
<\V\49,823, 28.166,6,56> <\VA\21>
<\V\49,823,-1.211,109,3> <\VA\22>
<\V\49,836, 13.666,12,27> <\VA\23>
<\V\49,836,-1.287,101,3> <\VA\24>
<\V\49,992, .469,145,2> <\VA\24>
<\V\49,703,-.756,165,2> <\VA\24>
<\V\49,1000, .402,149,2> <\VA\24>
<\V\49,780, 2.871,39,6> <\VA\25>
<\V\49,780,-1.676,96,3> <\VA\26>
<\V\49,856, 6.771,22,13> <\VA\27>
<\V\49,856,-1.395,86,3> <\VA\28>
<\V\49,673,-.656,175,2> <\VA\28>
<\V\49,955,-.098,132,2> <\VA\28>
<\V\49,984,-.143,146,2> <\VA\28>
<\V\49,1005, .291,151,2> <\VA\28>
<\V\49,923,-.068,116,2> <\VA\28>
<\V\49,868, 4.750,28,9> <\VA\29>
<\V\49,759, 3.551,29,7> <\VA\30>
<\V\49,868,-1.445,74,3> <\VA\31>
<\V\49,759,-1.484,99,3> <\VA\32>
<\V\49,1010,-.207,159,2> <\VA\32>
<\V\49,649,-.568,181,2> <\VA\32>
<\V\49,892,-.068,100,2> <\VA\32>
<\V\49,1033,-.273,171,2> <\VA\32>
<\V\49,1044,-.295,176,2> <\VA\32>
<\V\49,873, 3.773,31,7> <\VA\32>
<\V\49,873,-1.430,65,3> <\VA\33>
<\V\49,1001, .201,149,2> <\VA\34>
<\V\49,862,-.094,85,2> <\VA\34>
<\V\49,746, 4.135,22,8> <\VA\35>
<\V\49,746,-1.336,98,3> <\VA\36>
<\V\49,630,-.482,184,2> <\VA\36>
<\V\49,1048,-.342,178,2> <\VA\36>
<\V\49,837,-.191,73,2> <\VA\35>
<\V\49,1057,-.377,183,2> <\VA\36>
<\V\49,706,-.098,101,2> <\VA\36>
<\V\49,691,-.082,108,2> <\VA\35>
<\V\49,675,-.076,116,2> <\VA\36>
<\V\49,990, .117,144,2> <\VA\36>
<\V\49,871, 3.398,30,7> <\VA\36>
<\V\49,871,-1.326,58,3> <\VA\37>
<\V\49,736,-.094,85,2> <\VA\38>
<\V\49,738, 4.277,18,8> <\VA\39>
<\V\49,738,-1.223,94,3> <\VA\40>
<\V\49,659,-.039,122,2> <\VA\40>
<\V\49,619,-.402,181,2> <\VA\40>
<\V\49,1058,-.420,183,2> <\VA\40>
<\V\49,642,-.021,129,2> <\VA\40>
<\V\49,761,-.014,69,2> <\VA\40>
<\V\49,815,-.369,62,2> <\VA\40>
<\V\49,628, .021,133,2> <\VA\40>
<\V\49,1063,-.455,186,2> <\VA\40>
<\V\49,610, .049,140,2> <\VA\40>
<\V\49,973, .043,135,2> <\VA\40>
<\V\49,862, 3.559,25,7> <\VA\41>
<\V\49,862,-1.129,54,3> <\VA\42>
<\V\49,780, .166,54,2> <\VA\42>
<\V\49,739, 3.209,19,6> <\VA\43>
<\V\49,739,-1.162,86,3> <\VA\44>
<\V\49,612,-.320,177,2> <\VA\44>
<\V\49,1060,-.504,184,2> <\VA\44>
<\V\49,601, .090,142,2> <\VA\44>
<\V\49,885,-1.457,48,3> <\VA\44>
<\V\49,800,-.635,55,2> <\VA\43>
<\V\49,915,-1.254,63,3> <\VA\44>
<\V\49,854,-1.969,33,4> <\VA\44>
<\V\49,582, .135,148,2> <\VA\44>
<\V\49,1060,-.543,184,2> <\VA\45>
<\V\49,951,-.016,124,2> <\VA\45>
<\V\49,794, .512,41,2> <\VA\45>
<\V\49,848, 4.277,18,8> <\VA\46>
<\V\49,748, 1.955,23,4> <\VA\47>
<\V\49,848,-.852,54,2> <\VA\48>
<\V\49,748,-1.162,74,3> <\VA\49>
<\V\49,942,-1.184,76,3> <\VA\49>
<\V\49,823,-3.705,17,7> <\VA\49>
<\V\49,578, .176,147,2> <\VA\49>
<\V\49,615,-.250,168,2> <\VA\49>
<\V\49,758, 1.355,28,3> <\VA\50>
<\V\49,758,-1.207,67,3> <\VA\51>
<\V\49,963,-1.195,87,3> <\VA\50>
<\V\49,925,-.063,111,2> <\VA\51>
<\V\49,792,-32.000,2,64> <\VA\49>
<\V\49,801, 1.129,31,3> <\VA\47>
<\V\49,793,-.959,51,2> <\VA\47>
<\V\49,764, .967,31,2> <\VA\48>
<\V\49,764,-1.232,60,3> <\VA\49>
<\V\49,1049,-.637,179,2> <\VA\47>
<\V\49,826, 9.855,7,19> <\VA\48>
<\V\49,826,-.551,58,2> <\VA\49>
<\V\49,778, .631,38,2> <\VA\50>
<\V\49,778,-1.365,52,3> <\VA\51>
<\V\49,696, 5.750,12,11> <\VA\50>
<\V\49,895,-.082,96,2> <\VA\51>
<\V\49,623,-.184,157,2> <\VA\51>
<\V\49,558, .273,149,2> <\VA\51>
<\V\49,796,-1.074,53,2> <\VA\49>
<\V\49,788, .371,43,2> <\VA\50>
<\V\49,788,-1.500,44,3> <\VA\51>
<\V\49,803,-1.783,37,4> <\VA\52>
<\V\49,803, .238,50,2> <\VA\53>
<\V\49,977,-1.275,94,3> <\VA\53>
<\V\49,864,-10.832,6,21> <\VA\54>
<\V\49,864,-.061,81,2> <\VA\55>
<\V\49,682, 4.625,16,9> <\VA\55>
<\V\49,832,-2.908,22,6> <\VA\56>
<\V\49,832, .029,65,2> <\VA\57>
<\V\49,818,-2.213,28,4> <\VA\55>
<\V\49,818, .068,58,2> <\VA\56>
<\V\49,799,-.332,66,2> <\VA\57>
<\V\49,666, 3.545,22,7> <\VA\57>
<\V\49,802, 2.174,23,4> <\VA\55>
<\V\49,794,-1.250,52,3> <\VA\54>
<\V\49,1031,-.729,170,2> <\VA\55>
<\V\49,639,-.117,143,2> <\VA\55>
<\V\49,654, 3.398,25,7> <\VA\53>
<\V\49,546, .377,148,2> <\VA\54>
<\V\49,802,-1.303,56,3> <\VA\53>
<\V\49,768,-.168,77,2> <\VA\54>
<\V\49,986,-1.387,98,3> <\VA\54>
<\V\49,662,-.070,128,2> <\VA\52>
<\V\49,639, 3.000,30,6> <\VA\48>
<\V\49,756,-.100,80,2> <\VA\49>
<\V\49,677,-.066,120,2> <\VA\50>
<\V\49,737,-.078,89,2> <\VA\50>
<\V\49,992,-1.414,101,3> <\VA\48>
<\V\49,707,-.057,104,2> <\VA\49>
<\V\49,1007,-.828,158,2> <\VA\50>
<\V\49,804,-1.438,57,3> <\VA\50>
<\V\49,722,-.041,95,2> <\VA\49>
<\V\49,690,-.035,111,2> <\VA\50>
<\V\49,794, 3.250,20,6> <\VA\50>
<\V\49,815,-1.418,62,3> <\VA\48>
<\V\49,631, 3.266,30,6> <\VA\48>
<\V\49,541, .506,142,2> <\VA\48>
<\V\49,987,-1.523,99,3> <\VA\48>
<\V\49,979,-.938,144,2> <\VA\48>
<\V\49,617, 3.182,33,6> <\VA\43>
<\V\49,822,-1.484,66,3> <\VA\44>
<\V\49,834,-1.436,71,3> <\VA\44>
<\V\49,988,-1.596,99,3> <\VA\44>
<\V\49,777, 3.809,21,7> <\VA\44>
<\V\49,949,-1.045,129,2> <\VA\44>
<\V\49,614, 3.645,31,7> <\VA\44>
<\V\49,859,-1.381,84,3> <\VA\42>
<\V\49,546, .646,133,2> <\VA\42>
<\V\49,918,-1.176,113,3> <\VA\42>
<\V\49,981,-1.719,96,3> <\VA\41>
<\V\49,887,-1.285,98,3> <\VA\42>
<\V\49,602, 3.813,32,7> <\VA\38>
<\V\49,755, 3.957,24,8> <\VA\38>
<\V\49,978,-1.828,94,4> <\VA\38>
<\V\49,604, 4.570,28,9> <\VA\36>
<\V\49,555, .826,121,2> <\VA\36>
<\V\49,748, 4.039,25,8> <\VA\36>
<\V\49,967,-1.988,89,4> <\VA\36>
<\V\49,730, 3.418,31,7> <\VA\36>
<\V\49,573, 1.027,107,2> <\VA\33>
<\V\49,960,-2.152,85,4> <\VA\32>
<\V\49,718, 3.293,34,6> <\VA\32>
<\V\49,599, 6.260,23,12> <\VA\28>
<\V\49,701, 2.805,41,5> <\VA\28>
<\V\49,594, 1.293,92,3> <\VA\28>
<\V\49,686, 2.607,46,5> <\VA\28>
<\V\49,669, 2.240,54,4> <\VA\28>
<\V\49,622, 1.617,76,3> <\VA\26>
<\V\49,653, 2.066,60,4> <\VA\26>
<\V\49,935,-2.602,73,5> <\VA\26>
<\V\49,602, 11.355,14,22> <\VA\23>
<\V\49,907,-3.287,59,6> <\VA\22>
<\V\49,876,-4.488,43,9> <\VA\19>
<\V\49,613, 86.000,2,172> <\VA\18>
<\V\49,814,-14.000,13,28> <\VA\14>
<\V\49,844,-6.750,28,13> <\VA\14>
                                               29
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               30
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
              APPENDIX -- SUMMARY OF ALL POX COMMANDS
  IN THE APPROXIMATE CHRONOLOGICAL ORDER IN WHICH THEY WERE IMPLEMENTED
page#
 ↓   [Original commands by R.E.Maas 1973]
      ;0        ALL OTHERS, ILLEGAL
 5   ;1  |    SET NEW ESCAPE
 3   ;2  M    MAKE A NEW FONT
 4   ;3  ;    IGNORE THRU LF ETC.
 4   ;4  ,    IGNORE THRU FF
 3   ;5  F    FONT SELECT
 3   ;6  f    FONT SELECT FOR ONE CHARACTER
12  ;7  S    SAMPLE
 4   ;10 J   JUSTIFY
 9   ;11 j   JUSTIFY
 4   ;12 C   CENTER
 9   ;13 c   CENTER
 4   ;14 R   RIGHTIFY
 9   ;15 r   RIGHTIFY
 7   ;16 ←+-*/\¬∧∨%L~_ Q-REGISTER ARITHMETIC
 7   ;17 →   Q REGISTER DEPOSIT
 8* ;62 ↑↓ Q-REGISTER SUB/SUP-SCRIPT [GENERATES ESCAPE SEQ. VIA XCT W]
 8   ;20 ∩∪⊗MOVE BASELINE.
      [Added by R.E.Gorin 1973-74]
 8   ;21 U   UNDERSCORE
10  ;22 P   PUSH
10  ;23 p   POP
 9   ;24 '   QUOTE WITH RUBOUT <<NOT RECOMMENDED>>
10  ;25 λ   SET SPECIAL LINE SPACE FROM AC0
10  ;26 V   VECTOR
11  ;27 Y   Set Y position
      [Added by R.E.Maas 1974-77]
15,17;30 ∞Define macro
15,18;31 !Call macro
15,18;32 ?If QREGAC>0 then call macro else scan but null semantics
15,18;   I While QREGAC>0 continue calling macro
16  ;33 @   Require source file, then return
16  ;34 α   Jump to file, don't return
10*;26 v   pretty vector
10  ;35 Q   PUSH WITH ARG
10  ;36 q   POP WITH ARG
13  ;37 o   DEFINE ATOMIC TEXT OVERLAY
14  ;40 O   OUTPUT OVERLAY
14  ;41 123456LOAD QREGAC WITH PARAMETER FROM OVERLAY <<5,6 NOT WORKING>>
24  ;42 `   [TEMPORARY] SET UP VERSION FLAGS <<NOT RECOMMENDED>>
14  ;43 &   COMBINE SEVERAL OVERLAYS INTO ONE, WITH OFFSETS EACH
15  ;44 ∂   RENAME OVERLAY IN COMPLICATED WAY
14  ;45 :   CLOBBER SELECTED SIZE PARAMETER OF OVERLAY
11  ;46 ε   SET MINIMUM BASELINE SPACING, USED IN CONJUNCTION WITH λ
 4   ;47 <SP><TB>IGNORE SPACES UNTIL ; SEEN (FOR PRETTY SOURCE FILES)
 4   ;50 <VT>NBREAK TO NEXT LINE HERE WITHOUT AFFECTING SYNTAX
12  ;51 u   CALLI UUO
 9   ;52 "   QUOTE THE NEXT CHARACTER (WITHOUT RUBOUT UNLESS NEEDED)
      ;53 n   NO PAGE CHANGE NEXT TIME <<NOT SUPPORTED>>
 9   ;54 A   CVT QREG TO CHARACTER (WITHOUT RUBOUT UNLESS NEEDED) AND OUTPUT
24  ;55 ⊂   TURN ON DEBUG FLAGS -- VLEVE←VLEVEL∨ARG
24  ;56 ⊃   TURN OFF DEBUG FLAGS -- VLEVEL←VLEVEL∧(¬ARG)
 8   ;57 {[ START UNDERLINE [WRITES ESCAPE SEQUENCE VIA XCT W]
                                               30
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
                                               31
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
 8   ;60 }] STOP UNDERLINE [DITTO]
 9   ;61 D   CONVERT DECIMAL TO STRING MACRO AND SPLICE NOW [INPDL]
14*;40 W   SAME AS O BUT FORCES ON SAME PAGE, DOES NOT AFFECT PAGE PRINTER
16  ;63 β   DO LOOKUP ON FILE, WARN IF MISSING, BUT DON'T READ IT
16*;33 ∀   SCAN OF LIBRARY OF MACRO DEFINITIONS
10  ;64 #   PUSH FONT# ON STACK
10  ;65 G   POP FONT# FROM STACK AND SELECT
11  ;66 y   FUDGE Y0 PARAMETERS TO ADJUST VERTICAL POS.
11  ;67 BbTteSET AND READ BOTTOM MARGIN (TMAR+PMAR) OR TOP MARGIN
23  ;70 <=>ALTERNATE-OUTPUT-FILE, OPEN OUTPUT-TO CLOSE
12  ;71 ∃   GET DATE/TIME-LAST-WRITTEN OF INPUT FILE
24  ;72 E   EXECUTE TASK ON PSEUDOTELETYPE
16  ;   m     MESSAGE ON TTY
12,14;73 sHat current x,y location, store x,,y or emit overlay-qua-character
12  ;74 g   get internal parameters
 9   ;75 a   PUT ASCII VALUE OF NEXT CHAR INTO QREGAC
11  ;76 ≤   SET MAXIMUM INTERWORD GAP
      [Not yet implemented]
      ;N1 X   (RESERVED FOR EXTENDED-SCANNER TO BE IMPLEMENTED SOMEDAY)
      ;N2 π   (RESERVED FOR ILLEGAL COMMAND TO ENTER DEBUG PACKAGE)
          INDEX TO POX COMMANDS IN ASCII-ALPHABETICAL ORDER
       NUMBER REFERS TO SUMMARY OF COMMANDS IN PREVIOUS TABLE
    AN ASTERISK HERE MEANS IT'S NOT LOCATED IN NUMERICAL ORDER THERE
      xx0xx1xx2xx3xx4xx5xx6xx7
00xNUL 00↓ 62*α 34β 63∧ 16¬ 16ε 46π N2
01xλ 25TB 47LF 00VT 50FF 00CR 00∞ 30∂ 44
02x⊂ 55⊃ 56∩ 20∪ 20∀ 33*∃ 71⊗ 20↔
03x_ 16→ 17~ 16≠ ≤ 76≥   ≡    ∨ 16
04xSP 47! 31" 52# 64$% 16& 43' 24
05x( (?)) * 16+ 16, 04- 16. 03/ 16
06x0    1 412 413 414 415 (41)6 (41)7 41
07x8 309   : 45; 03< 70= 70> 70? 32
10x@ 33A 54B 67C 12D 61E 72F 05G 65
11xH 73I 32J 10K L 16M 02N 50O 40
12xP 22Q 35R 14S 07T 67U 21V 26W 40*
13xX N1Y 27Z  [ 57\ 16] 60↑ 62*← 16
14x` 42a 75b 67c 13de 67f 06g 74
15xh    i    j 11k   l    m 72n 53o 37
16xp 23q 36r 15s 73t 67u 51v 26*w (26)
17xx    y 66z   { 57| 01ALT 00} 60BS 00
   (To use the above table to locate the command corresponding to a particular character, look up
the character according to ASCII number, use the numerical entry in the table to reference the
preceding table, and read the description on that table. That first table now includes page numbers for
your convenience in locating the full description elsewhere in this writeup. The table of contents,
however, will usually be more useful for locating general types of commands.)
                                               31
                                                   POX writeup, last edited 1981 MAY 13  15:56 -- page 
             PROTOTYPE OVERLAY XEROGRAPHICS -- WRITEUP
                           CONTENTS
               (page numbers here can be used to select individual pages for XSPOOLing) ↓↓
Contents [this page, generated after p.31, bound before p.1]i
<\V\52,200, .000,1,1310> <\VA\1>
<\V\52,200, .000,1,1310> <\VA\1>
Introduction                                     1
    Sample POX manuscript                 2
    This writeup, organization, modes, notation 2
    BNF notation used in this writeup 3
<\V\53,200, .000,1,1310> <\VA\1>
<\V\53,200, .000,1,1310> <\VA\1>
Basic commands                                  3
    Table of modes and commands       4
    Examples                                         5
Linefeed simulator                          6
<\V\55,200, .000,1,1310> <\VA\1>
<\V\55,200, .000,1,1310> <\VA\1>
Registers and XY coordinates        6
    Arguments to commands                 6
    Commands (most of the POX commands are in this section...) 7
    ...Vectors...                             10
    ...Interline spacing...          10
    Examples                                       12
<\V\49,200, .000,1,1310> <\VA\1>
<\V\49,200, .000,1,1310> <\VA\1>
Overlays                                           13
    Examples                                       15
<\V\49,200, .000,1,1310> <\VA\1>
<\V\49,200, .000,1,1310> <\VA\1>
Macros without arguments, require source files15
    Examples                                       17
<\V\49,200, .000,1,1310> <\VA\1>
<\V\49,200, .000,1,1310> <\VA\1>
Macros with arguments                   17
    Commands                                       17
    Detailed algorithm of evaluation19
    Examples                                       20
    Detailed examples of argument evaluation20
    Advanced examples (MONTH<N>, EVAL, RECURSE, DEFCONT, EVERYPAGE) 21
Alternate output (text) files    23
<\V\49,200, .000,1,1310> <\VA\1>
<\V\49,200, .000,1,1310> <\VA\1>
Special-feature bits                    24
    Batch 0                                          25
    Batch 1                                          26
    Examples                                       26
<\V\49,200, .000,1,1310> <\VA\1>
<\V\49,200, .000,1,1310> <\VA\1>
Remarks on using the POX program26
    Backtrace/Error package          26
    Known bugs in POX (by number)  27
    Notes (by number)                       28
    Trivia                                           29
<\V\49,200, .000,1,1310> <\VA\1>
<\V\49,200, .000,1,1310> <\VA\1>
Appendix                                           30
    Chronological list of commands (with page references)30
    ASCII sequence table                 31
                                               i
                                                 POX writeup, last edited 1981 MAY 13  15:56 -- page